...

saving changes to XML file using XMLDOM

zduck
09-30-2002, 02:00 PM
I'm trying to save the changes I made to an xml file with the following code...

xmldoc = server.createobject("microsoft.xmldom")
xmldoc.async = false
xmldoc.load(server.mappath("file.xml")

'changes go here....

xmldoc.save("file.xml")

and it gives me back a general access denied error. The directory has write access and the file is not read-only. Any help would be appreciated.

Mihaela
10-01-2002, 12:04 PM
I guess the problem is here:
xmldoc.save(Server.MapPath("file.xml"))

And of course, be sure that directory has write permissions.

zduck
10-01-2002, 12:44 PM
still doesn't work. Same error.

-Zduck.com

dhtroy
10-12-2002, 08:13 PM
Oddly enough, according to the XML SDK from MS, the Save() method passing a string argument is "not intended for use from a secure client, such as Microsoft® Internet Explorer."

Perhaps this is why you're getting the error message? Maybe if you made you're HTML document a HTC document, that would by-pass the security and allow you to do writes to the client machine.

Of course, HTC is a whole other ball game.

jkd
10-12-2002, 09:27 PM
Originally posted by dhtroy
Oddly enough, according to the XML SDK from MS, the Save() method passing a string argument is "not intended for use from a secure client


IE shouldn't have any problems with Save() then. :rolleyes:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum