Alessandro Jacopson
Alessandro Jacopson

Reputation: 18613

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 physical machine. Will it save it to "C:..." of the calling machine, or the server hosting the COM object?

Upvotes: 1

Views: 924

Answers (1)

Rob Kennedy
Rob Kennedy

Reputation: 163277

It will be at the location you give it on your local system. The save function interprets its argument as a path and file name if you give it a string, so that's the file that the object saves its contents into. The file doesn't need to exist beforehand, but the directories should.

In addition to strings, the save function can also accept certain other types of arguments, including "an ASP Response object, an XML document object, or a custom object that supports persistence." See the documentation for details.

Upvotes: 1

Related Questions