2011-01-13 62 views
0

我的問題很簡單。我有一個XercesDOMParser,所以我可以通過getDocument()訪問存儲在其中的DOMDocument。在Xerces-C中打印XML文檔

我想獲得代表樹的xml字符串。

什麼是正確的呼叫?我假設圖書館提供了有效的操作員/功能。

回答

1

這是因爲我使用的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. 
+0

謝謝......我在doc漫遊沒有一個很好的方向......想你是光我在等待:) – Andry 2011-01-13 22:29:15