SYMPTOMS

Validating an XML Document with MSXML gives the following error message:

0xC00CE00A. Parameter entity must be defined before it is used.

STEPS TO REPRODUCE BEHAVIOR

1 - Start XMLBlueprint.

2 - Paste the following code into a new text document, and save the file as book.xml:

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE book SYSTEM "book.dtd">

<book>

</book>

3 - Paste the following code into a new text document, and save the file as book.dtd in the same folder as book.xml:

<!ELEMENT book (#PCDATA)>

<!ENTITY % module "IGNORE">

<![%module;[

%MSXML-should-ignore-this;

]]>

4 - Open file book.xml and validate by clicking XML > Validate. The error message will appear in the Output Window.

SOLUTION

To avoid this error, add entity MSXML-should-ignore-this to file book.xml:

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE book SYSTEM "book.dtd" [

<!ENTITY % MSXML-should-ignore-this "">

]><book>

</book>