aspose file tools*
The moose likes XML and Related Technologies and the fly likes XML Parsing issuse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Parsing issuse" Watch "XML Parsing issuse" New topic

XML Parsing issuse

Sireesh Ganagam

Joined: May 08, 2012
Posts: 21
Hello All,

How you doing. I have xml file generated i want to read rc , rm values in that but i am getting exceptions. How can i achieve this. Appreciate your help

Exceptions :

[Fatal Error] :7:46: Character reference "&x2" is an invalid XML character.
org.xml.sax.SAXParseException: Character reference "" is an invalid XML character.
at javax.xml.parsers.DocumentBuilder.parse(
at VBSexe.convertXMLFileToString(
at VBSexe.main(
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12803
Obviously the first step will be to get a readable XML document by locating and fixing all those illegal characters.

How was this document generated? If it got anywhere near Microsoft word it may be contaminated with those accursed "smart punctuation" characters.

If you catch the SAXParseException try extracting the line and column number to help locate the bad character in the text.

A programmer's editor that can show and patch HEX values will be a big help too.

I agree. Here's the link:
subject: XML Parsing issuse