开发者

Printing an XML Document in Xerces-C

开发者 https://www.devze.com 2023-02-04 10:43 出处:网络
My problem is simple. I have a XercesDOMParser, so I can access through getDocument() to the DOMDocument stored in it.

My problem is simple. I have a XercesDOMParser, so I can access through getDocument() to the DOMDocument stored in it.

I want to ge开发者_开发百科t the xml string representing the tree.

What is the correct call? I assume a valid operator/function is provided by the library.


It's some time since I used Xerces-C but I would look at http://xerces.apache.org/xerces-c/apiDocs-2/classDOMWriter.html This takes care of the encoding and other problems (which are easy to overlook).

I'd look first at

virtual XMLCh *     writeToString (const DOMNode &nodeToWrite)=0
    Serialize the specified node as described above in the description of DOMWriter.
0

精彩评论

暂无评论...
验证码 换一张
取 消