开发者

How to create XML from MSXML DOM

开发者 https://www.devze.com 2022-12-10 08:39 出处:网络
I\'ve loaded an XML into a MSXML DOM node hierarchy, manipulated some of the nodes, and now I\'d like to c开发者_开发技巧reate an XML as a string from the node hierarchy. I know MSXML exposes a save f

I've loaded an XML into a MSXML DOM node hierarchy, manipulated some of the nodes, and now I'd like to c开发者_开发技巧reate an XML as a string from the node hierarchy. I know MSXML exposes a save functionality through IXMLDOMDocument.save(), however it is: 1) non-standard (i.e. not specified by W3C), and 2) apparently only writing to files (e.g. not to streams).

Now, being non-standard is not really a deal breaker for me, but no stream output is. Do anyone know how to solve this, or do I have to write my own method? Thanks!


Where the documentation states "or a custom object that supports persistence" it means an implementation of IStream.

BTW, I can't find any standards defining how a DOM should be saved so I doubt there is any need to worry about using a the "non-standard" save method.

0

精彩评论

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

关注公众号