Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

XML Parsing Error

 
Indrayani Bhoir
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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?
thanks,
indu
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!