Just to give more information. This is not a byte-order issue as I originally suspected. The parsing validator runs fine if it is run stand alone. (I'll explain below.)

I failed to tell you that I use Hibernate to store parsing errors in the database and hibernate stores it's Object-Relation mapping as XML files and it uses it's own parsing and my guess is that a listener initialized by Hibernate stays in the VM and my parser ends up using that and that' why I get a well-formed error.

How can I find out what listener my parses uses? (XMLParserConfiguration or ComponentManager...)

I still can't explain why this runs fine under windows... It may have semething to do with the way windows handles threads.

Thanks,
-ramin




[EMAIL PROTECTED]

10/26/2004 06:12 PM

Please respond to
[EMAIL PROTECTED]

To
[EMAIL PROTECTED]
cc
Subject
SAX parser claims document not well-formed






I am reading the data from file (pipe delimited) and then convert them to XML and pass it to XML parser.


If I run the parser on Win-doze, it parses fine. But if I run it on AIX, I get the following exception:


org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.

       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)


The code that calls the parser is this:


           parser.parse( new InputSource( input.toXMLString() ));


The method toXMLString returns ByteArrayInputStream.


Anyone knows why this is happening? My guess is a little-endian/big-endian byte order issue. If so, how could I fix that? I tried setting the encoding before I call the parse method. But no help.


Your help will be appreciated.


Thanks,

-ramin

Reply via email to