使用“小于"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:
问题是解析器不允许这个小于"(<)字符.
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?
推荐答案
您应该将 <
替换为 <
这篇关于使用“小于"XML 文档中的字符 (&lt;) 并解析它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文