954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

error parsing XML string using Document builder

Can someone help me parse a XML string using SAX parser and then validate the same against the XSD defined'

I have the program that works when I pass the input xml and xsd as arguments but my requirement involves passing a input string containing the target XML and the XSD as arguments

I am getting the below error when parsing the XML string using DocumentBuilder

[Fatal Error] BlendedProfile.xsd:2:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
The error is The processing instruction target matching "[xX][mM][lL]" is not allowed.

thrusai
Newbie Poster
3 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

thrusai,

Error is
The processing instruction target matching "[xX][mM][lL]" is not allowed.

Are you sure that the XSD is a valid xml document?
Please post the XML and XSD document : If XSD and XML are very large (more than 20 lines) then zip it and attach with your reply.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Both are valid documents .I am sure on that.I opened both the XSD and XML in the IE and found that they are well formed

thrusai
Newbie Poster
3 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You