[EMAIL PROTECTED] wrote:
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.
Ramin,
Perhaps you could post the document somewhere and point us to
it so we could actually see the markup. Otherwise it's just a
guess. It doesn't sound like an encoding issue if the parser
was able to read past the XML and/or DOCTYPE declarations, which
it seems is happening if the error talks about *after* the root
element. (Note that XML documents can only contain one document
element.) There might be a difference beyond simply changing
from Windows to AIX that isn't immediately evident, and there's
not enough information provided to know. So looking at the
document would certainly help a bit.
[If the content is in any way sensitive, strip out the sensitive
parts, see if the error still occurs, then post and announce.]
Murray
......................................................................
Murray Altheim http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK .
[International terrorism] is a fantasy that has been exaggerated
and distorted by politicians. It is a dark illusion that has
spread unquestioned through governments around the world, the
security services, and the international media. In an age when
all the grand ideas have lost credibility, fear of a phantom
enemy is all the politicians have left to maintain their power."
The making of the terror myth, The Guardian
http://www.guardian.co.uk/terrorism/story/0,12780,1327904,00.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]