如何使用tinyxml库获取xml文件中的CDATA。如果可以的话给出2-3行代码片段?
如何使用tinyxml库获取xml文件中的CDATA。如果可以的话给出2-3行代码片段?
how to get CDATA in xml file using tinyxml library. If possible give a 2-3 line code snippet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TinyXML 将 CDATA 视为文本:
http://www.grinninglizard.com/tinyxmldocs/classTiXmlText.html
它应该是一个 TxXmlText 节点,其中 CDATA() 方法返回 true。
需要注意的一点是:TinyXML 测试套件 (xmltest.cpp) 没有测试用例。
TinyXML sees CDATA as text:
http://www.grinninglizard.com/tinyxmldocs/classTiXmlText.html
It should be a TxXmlText node where the CDATA() method returns true.
Minor point of caution: there isn't a test case for this the TinyXML test suite (xmltest.cpp).