wood burning stoves*
The moose likes XML and Related Technologies and the fly likes XML Parsing Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Parsing Error" Watch "XML Parsing Error" New topic

XML Parsing Error

Indrayani Bhoir

Joined: Dec 02, 2002
Posts: 21
I am getting XML Parsing error in case, when my xml file data contains charcters like (", &) etc. As '&' is required to be present the XML Data i can't replace this char with any other char or 'and'.
how i can handle XML Parsing error in such case?
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Apparently the existence of quotes and ampersands in your XML makes the document malformed XML. Thus, you need to either encode those characters in the XML document, or enclose them into a CDATA block.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Don't get me started about those stupid light bulbs.
subject: XML Parsing Error
Similar Threads
Tag library
Sending XML data to webservice
trouble parsing "&" from xml file
What is SAXParseException??? Plz help...
error logging