使用C++开发,在Xerces中,如果从字符串中生成DOM Document?

为了跨平台方便,我在开发中使用了Apache的Xerces的C++版本做为XML解析器,开发中方向可以使用DOMWriter::writeToString方法将一个DOM Document变成XMLCh字符串输出。但是不知道如果能够从一个XML字符串解析为一个DOM Document。
---------------------------------------------------------------

use DOMParser's parse method, see an example here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=1497cff5.0204142113.675376ee%40posting.google.com
把DOMParser改为了XercesDOMParser,这样就可以使用DOMDocument而不是DOM_NODE了。

Published At
Categories with Web编程
Tagged with
comments powered by Disqus