Thursday, December 1, 2011

XML Parsing error

Sometimes while parsing an xml document, you might hit the following error:
[Fatal Error] :2:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.

This cryptic error is because the xml-string has whitespace preceeding the <xml ..> tag.  Use trim() to get rid of the whitespace and off you go!



No comments:

Post a Comment