I need to parse a XML document in which there are conditions like the below example:
<element condition="var < 5">element name</element>
The problem is that the parser doesn't allow this 'is less than' (<) character.
I tried GDataXML -> it gives me an error saying there is an illegal character.
I also tried TBXML -> it doesn't take into account the attributes where there is this character.
I guess it's the same for other parsers.
How can I fix this?
You should replace <
with <
来源:https://stackoverflow.com/questions/10683282/using-is-less-than-character-in-a-xml-document-and-parse-it