Error: The processing instruction target matching "[xX][mM][lL]" is not allowed
Xerces-based tools will emit the following error
The processing instruction target matching "[xX][mM][lL]" is not allowed.
when an XML declaration is encountered anywhere other than at the top of an XML file.
This is a valid diagnostic message; other XML parsers should issue a similar error message in this situation.
To correct the problem, check the following possibilities:
Some blank space or other visible content exists before the
<?xml ?>
declaration.Resolution: remove blank space or any othervisible content before the XML declaration.
Some invisible content exists before the
<?xml ?>
declaration. Most commonly this is a Byte Order Mark(BOM).Resolution:Remove the BOM using techniques such as those suggested by the W3Cpage on the BOM in HTML.
A stray
<?xml ?>
declaration exists within the XML content. This can happen when XML files are combined programmatically orvia cut-and-paste. There can only be one<?xml ?>
declarationin an XML file, and it can only be at the top.Resolution: Search for
<?xml
in a case-insensitive manner, and remove all but the top XMLdeclaration from the file.