SAX Parse Exception

Posted by Anand on Stack Overflow See other posts from Stack Overflow or by Anand
Published on 2010-04-16T08:25:30Z Indexed on 2010/04/16 8:33 UTC
Read the original article Hit count: 425

Filed under:
|

Hi,

I am using JMS Messaging in my java program. My messages are coming from IBM Main Frame and the messages are xml files.

Mainframe pushwa messages that is xml files to the queue

But when the java program reads the messages from the queue an additional character "?" gets added in front of the xml file. For example a file like this:

<?xml version="1.0" encoding="UTF-8"?>

becomes

?<?xml version="1.0" encoding="UTF-8"?>

when I read the message from the queue.

And when I try to parse this I catch the following exception

SAX Exception org.xml.sax.SAXParseException: Content is not allowed in trailing section. Content is not allowed in trailing section

What could be the reason for this additional character getting added ?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about saxparseexception