0

I found similar question here An invalid XML character (Unicode: 0x0) and because of less reputation I could not ask there itself.

I saw the problem with the record also,in my case it was like a String="0/" . So I guess in java(while parsing xml) you are not allowed to pass 0/ together.

But Is there any way to tell Java about this possible problem and ignore it. Because in some cases maybe we do not want to modify all hundreds of records where this entry was made.

Community
  • 1
  • 1
Mohit Bhagat
  • 245
  • 5
  • 14
  • It's not about Java; the XML standard itself does not allow a null character in XML. – kjhughes May 09 '17 at 12:40
  • but I am already returning many fields from DB which have null values, this problem is occuring only for one record which have String like '0/'. Wow to tell program to ignore such things. – Mohit Bhagat May 10 '17 at 05:51
  • Make sure that you differentiate between an empty string and a null character; they are not the same. You can certainly have XML elements or attributes with empty string values; you cannot have a null character anywhere in an XML document. – kjhughes May 10 '17 at 12:21

0 Answers0