|
-
April 16th, 2003, 10:17 PM
#1
Saving XML using XMLDOM gives errors
I am trying to save an XML document by calling the save method on an XMLDOM object. However the save method call fails. I have tried sending in the complete path and also the virtual path but does not work.
Following is the code:
Dim str, xmldoc
Set xmldoc = CreateObject("Microsoft.XMLDOM")
xmldoc.loadXML Request("strXml")
If xmlDoc.parseError.errorCode <> 0 Then
Msg = "The string you entered was not well-formed XML. " & _
xmlDoc.parseError.reason
Else
xmldoc.save(Server.MapPath("saved.xml")) ---- GIVES ERROR
str = Request("strXml")
str = Replace(str, Chr(38),"&", 1, -1, 1)
str = Replace(str, Chr(34),""", 1, -1, 1)
str = Replace(str, Chr(46),".", 1, -1, 1)
str = Replace(str, Chr(60),"<", 1, -1, 1)
str = Replace(str, Chr(62),">", 1, -1, 1)
Msg = "<P>Your XML string:<BR>" & str & _
"<BR>has been saved to the server as <A HREF='saved.xml'>saved.xml</A>.</P>"
Hope someone can help
Thanx.
-
April 17th, 2003, 12:25 PM
#2
If this is the error you are getting
-----------------------
msxml3.dll error '80070005'
Access is denied.
/tests/xmltest.asp, line 9
--------------------------
All you need to do is give the Internet guest account write permission to your application directory.
Your machine's Internet guest account id will be
IUSR_<your machine name>
give this user write permission to the directory by right clicking on the directory name in windows explorer, go to properties -> security
Select the account and make changes to the access permissions
If your error is not the same, and this does not solve your problem, do let us know
Satish
-
April 17th, 2003, 05:44 PM
#3
Thanx. I shall try that and get back.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|