[jdom-interest] JDOM Exception: invalid XML character (Unicode: 0xb) found

Charlie Wu cwu at brocade.com
Tue Jul 23 12:35:48 PDT 2002


Hi all:

Please help me with this.. I've spent 2 days on this with no success. here's
my problem:

I run a java program that querys a remote server and stores the result in an
XML file
with encoding set to UTF-8. (I also tried ISO-8859-1 with no success)

The XML loads fine in XML spy without any complaints for illegal characters
(if I set
the encoding in the XML header to ISO-8859-1 XML spy would warn about
characters
not present in the ISO-8859-1 encoding)

Then I run another java program that trys to use the SAXBuilder to build
this .. and
that's where I get the error as followed below.

I have searched the jdom archive and read the FAQ.. but still couldn't get
it correct :(

Can someone please give me a hand?

Thanks a million

Charlie

Exception eorg.jdom.JDOMException: Error on line 1588 of document
file:/c:/cwu/cosmos/test2.xml: 
An invalid XML character (Unicode: 0xb) was found in the element content of
the document.
org.jdom.JDOMException: Error on line 1588 of document
file:/c:/cwu/cosmos/test2.xml: 

An invalid XML character (Unicode: 0xb) was found in the element content of
the document.
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689)
        at AllegisReader.read(AllegisReader.java:72)
        at AllegisReader.main(AllegisReader.java:689)
Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode:
0xb
) was found in the element content of the document.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213
)
        at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:588)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1304)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
        ... 4 more
Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode:
0xb
) was found in the element content of the document.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213



More information about the jdom-interest mailing list