Boost XML parser can support <![CDATA[ … ]]>?

▼魔方 西西 提交于 2019-12-11 05:18:44

问题


I had able to read the XML file using boost and writing the same content to another file .

<data>
<![CDATA[This is Test]]>
<prod name= "p1"/>
</data>

while writing to another file this would changes to below format.

<data>
This is Test
<prod name= "p1"/>
</data>

Here unformatted texts like Is missing in the output file.

can some one help on how to write the exact as format for unformatted texts like ?


回答1:


Boost does not have an XML parser.

Boost Property Tree /uses/ an XML parser to... implement property tree persistence.

The XML parser it uses under the hood is a version of RapidXML.

RapidXML does support CDATA: RapidXML giving empty CDATA nodes

I doubt Property Tree uses it.



来源:https://stackoverflow.com/questions/37788650/boost-xml-parser-can-support-cdata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!