简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM