smart-fun / XmlToJson

Android Library for converting XML to JSON and JSON to XML
Apache License 2.0
558 stars 112 forks source link

To check: when a tag contains "<" or ">" #24

Open smart-fun opened 3 years ago

smart-fun commented 3 years ago

Received from LinkedIn:

[...] when one of the tag's content contains "<", ">" symbols, it will cut the text off. Like mast cell (p < 0.001) infiltration. The output will be {"Abstract" : "infiltration" }

smart-fun commented 3 years ago

The "<" character is not valid in a xml file and must be escaped.

See: https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents