Boost XML解析器可以支持<![CDATA […]]&gt ;? [英] Boost XML parser can support <![CDATA[ … ]]>?

查看:222
本文介绍了Boost XML解析器可以支持<![CDATA […]]&gt ;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用boost读取XML文件并将相同的内容写入另一个文件。

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 ?

推荐答案

Boost可以做到没有没有XML解析器。

Boost does not have an XML parser.

提升属性树/ uses /使用XML解析器来实现属性树持久性。

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

它在后台使用的XML解析器是RapidXML的版本。

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

RapidXML确实支持CDATA: RapidXML提供空的CDATA节点

RapidXML does support CDATA: RapidXML giving empty CDATA nodes

我怀疑属性树会使用它。

I doubt Property Tree uses it.

这篇关于Boost XML解析器可以支持&lt;![CDATA […]]&gt ;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆