Error about invalid XML characters on Java

前端 未结 4 683
野趣味
野趣味 2020-12-03 08:09

Parsing an xml file on Java I get the error:

An invalid XML character (Unicode: 0x0) was found in the element content of the document.

The xml c

4条回答
  •  盖世英雄少女心
    2020-12-03 08:24

    A bit of looking around reveals that 0x0 is a null character, someone else had the same problem with XML and null characters here http://forums.sun.com/thread.jspa?threadID=579849. Not sure how you are parsing the XML but if you get it as a string first there is some discusion on how to replace the null here http://forums.sun.com/thread.jspa?threadID=628189.

提交回复
热议问题