使用“小于” XML文档中的字符(<)并解析它 [英] Using "is less than" character (<) in a XML document and parse it
本文介绍了使用“小于” XML文档中的字符(<)并解析它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要解析一个XML文档,其中有以下条件的条件:
I need to parse a XML document in which there are conditions like the below example:
< element condition =var< 5>元素名称< / element>
问题是解析器不允许此'小于'(< ;)字符。
The problem is that the parser doesn't allow this 'is less than' (<) character.
我试过GDataXML - >它给我一个错误,说有一个非法字符。
I tried GDataXML -> it gives me an error saying there is an illegal character.
我也尝试过TBXML - >它没有考虑有这个角色的属性。
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?
推荐答案
你应该替换<
,& lt;
这篇关于使用“小于” XML文档中的字符(<)并解析它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文