• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAXParseException: for 2 following marshals

 
Dupont Girard
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I struggle to run this following code:



This is the exception raised:


My xml schema is correctly built and works perfectly for 1 marshal but not for 2 marshals followed

Someone Have an idea how to resolve this ?
 
Paul Clapham
Sheriff
Posts: 20992
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks as if you have two XML documents concatenated together in the same file.
 
Dupont Girard
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul for replying. is it not recommended ?
 
Paul Clapham
Sheriff
Posts: 20992
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about "recommended". I do know that if you give such a file to a parser and claim that it's an XML document, the parser will tell you (correctly) that it isn't a well-formed XML document.

A well-formed XML document has an optional prolog (the <?xml ... > part) at the beginning followed by a single root element. And nothing else.

If the parser sees a prolog in the middle of the document, it will attempt to treat it as a processing-instruction. And since processing-instructions in an XML document can't be named "xml", you get the error message which tells you that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic