ixmldomdocument

Saving a IXMLDOMDocument without end tag

Using MSXML via C++, when I call IXMLDOMDocument::save, empty XML elements will get an end tag, like this: <root> <child name="first"> </child> </root> But I want it saved as this: <root> <child name="first" /> </root> What do I need to do to accomplish that? ...

Where does out-of-process MSXML IXMLDOMDocument::save save?

Where does MSXML IXMLDOMDocument::save save? I mean when it's called with a file name argument. CComPtr< IXMLDOMDocument > doc; p->get_doc( &doc ); doc->save( CComVariant( L"C:\\pathto\\mydoc.xml" ) ); Where will "C:\pathto\mydoc.xml" be? Consider that the XMLDOMDocument is out of process, in this case located on a different physica...

Merging two XMLDOMDocuments

Hi, Is there any easy way in msxml to merge two xml documents (IXMLDomDocuments)? I want to make one of the trees embedded as a child of the second one. I saw that IXMLDomDocument3 offers importNode, but couldn't get it to work correctly. Is this the way to go or is there another solution? Thanks, Dan ...

How to Validate an XML Node against an XSD in C++?

Hi Please note that I'm asking for validation against a particular node and not the whole file. For examples <somexmldoc> <someNode> <UserDefinedNode> </> <UserDefinedNode> </> </someNode> </somexmldoc> For this XML doc, I have an wholeDoc.XSD which could be used to validate the whole document except "UserDef...

What vbscript DOMDocument calls are required to build this XML?

I want to achieve the following XML: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt; <s:Body> <GetStockOnSO xmlns="http://schneider-electric.com/OrderEntryService"&gt; <requestData xmlns:dc="http://schemas.datacontract.org/2004/07/Services.OrderEntry.DataContracts" xmlns:i="http://www.w3.org/2001/XMLSchem...

Save XML like XmlTextWriter but with DOM

When I build a XML in C# using XmlDocument, and I want to save to XML to file, including the encoding information, I use XmlTextWriter, as below: using (StringWriter swr = new StringWriter()) { using (XmlTextWriter xtw = new XmlTextWriter(swr)) { xmlDoc.WriteTo(xtw); return swr.ToString();...

Delphi, IXMLDOMDocument2, Load fails due to invalid character

Using Delphi 2009 and IXMLDOMDocument2 I receive "An invalid character was found in text content" error when loading XML into IXMLDOMDocument2. The character is 1B (in Hex) and is present within a CDATA section. Microsoft's XML viewer (IE) loads the file just fine. The XML looks like... <data><child><![CDATA[-- ]]></child></data> NOTE...