如何使用tinyxml库获取xml文件中的CDATA。如果可以的话给出2-3行代码片段?

发布于 2024-08-24 07:35:22 字数 51 浏览 7 评论 0原文

如何使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

皇甫轩 2024-08-31 07:35:22

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文