perfectxml.com
 Basic Search  Advanced Search   
Topics Resources Free Library Software XML News About Us
home » focus » msxml » ask a question » past questions & answers Friday, 12 October 2007
 
NEWS
MSXML 4.0 SP2 now available!

 
MSXML
Basics
DOM
SAX
XPath
XSLT
Schemas
SOM
HTTP Access
.NET
Data Islands
Ask a Question
   Past Q&As
C++ Samples
DLL/Version Info
Reference Guide
Books
KB Articles
   HOW TO
   SAMPLE
   INFO
   BUG/PRB
   FIX
   Misc.
MSXML Tips
   August 2002
   September 2002
MSXML Tools

Microsoft XML Core Services


Go back to list of previously asked questions and answers

Question: I am loading an XML document from a remote server, when I try to save this document, I get the msxml4.dll error '80070057' The parameter is incorrect. error.
Asked By: Anis
Viewed: 2924
Answer: MSXML DOMDocument save method requires a file name, an ASP Response object, a DOMDocument object, or a custom object that supports persistence; so, you can not do the following:

Set objDOMDocument = Server.CreateObject("Msxml2.DOMDocument.4.0")
objDOMDocument.async = false
objDOMDocument.setProperty "ServerHTTPRequest", true
xmlFile = "http://someremoteserver/book1.xml"
objDOMDocument.load xmlFile

'Modify the document, everything ok so far.

'Following line will raise the '80070057' The parameter is incorrect error
objDOMDocument.save objDOMDocument.url 
The alternatives include:
a.) Map a network drive to the remote server (if possible) and then load and save the document using the mapped drive letter. Make sure you have proper read/write permissions.

b.) Load the XML document as you are doing it, update the document, and then post the updated document using ServerXMLHTTP to another ASP page on the remote server, which can then save the received (updated) XML.


Go back to list of previously asked questions and answers
  Contact Us | E-mail Us | Site Guide | About PerfectXML | Advertise ©2004 perfectxml.com. All rights reserved. | Privacy