Error when validating xml.

Questions about XML that are not covered by the other forums should go here.
pcharles
Posts: 4
Joined: Fri Oct 14, 2005 7:09 pm

Error when validating xml.

Post by pcharles » Fri Oct 14, 2005 7:18 pm

Hi,

I get the following error when I try to validate an xml file:
SystemID: C:\Documents and Settings\pcharles\Desktop\rrsearch test\Document.xml
Location: 1:7
Description: F The processing instruction target matching "[xX][mM][lL]" is not allowed.

I don't understand what this error means, the file opens fine with IE 6.

I tried to go to your forums, but I don't know my username / password.

Thanks for your help.

Patrick

pcharles
Posts: 4
Joined: Fri Oct 14, 2005 7:09 pm

Post by pcharles » Fri Oct 14, 2005 7:23 pm

I found the problem.
I had a space at the beginning of the first line:

<?xml version="1.0" encoding="iso-8859-1" ?>
:D

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Mon Oct 17, 2005 9:55 am

Hi Patrik,

The XML header is allowed only at the start of the document. In your case you had a space at the beginning of the document and thus the <?xml ... ?> was considered a processing instruction and a processing instruction with the name xml (case insensitive) is not allowed.

Best Regards,
George

pcharles
Posts: 4
Joined: Fri Oct 14, 2005 7:09 pm

Post by pcharles » Mon Oct 17, 2005 2:11 pm

Thank you for your answer George. What was confusing me is that the MSXML parser didn't care, but that Oxygen was not validating the file.

Thanks again.

Patrick

Post Reply