我的问题很简单。我有一个 XercesDOMParser,所以我可以通过 getDocument() 访问存储在其中的 DOMDocument。
我想获取表示树的 xml 字符串。
正确的叫法是什么?我假设库提供了有效的运算符/函数。
最佳答案
我使用 Xerces-C 已经有一段时间了,但我会看看 http://xerces.apache.org/xerces-c/apiDocs-2/classDOMWriter.html 这会处理编码和其他问题(这些问题很容易被忽略)。
我会先看看
virtual XMLCh * writeToString (const DOMNode &nodeToWrite)=0
Serialize the specified node as described above in the description of DOMWriter.
关于c++ - 在 Xerces-C 中打印 XML 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4685812/