Search code examples
commsxml6ixmldomdocument

Remove XML declaration using msxml6/IXMLDOMDocument2


I want to remove XML declaration only from an XML using C++/COM-

<?xml version="1.0" encoding="UTF-8" ?>

using the IXMLDOMDocument2 interface of msxml6

How can I achieve this ?


Solution

  • Use IXMLDocument::xml property and save the string to a file.