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),"&#38;", 1, -1, 1)
str = Replace(str, Chr(34),"&#34;", 1, -1, 1)
str = Replace(str, Chr(46),"&#46;", 1, -1, 1)
str = Replace(str, Chr(60),"&lt;", 1, -1, 1)
str = Replace(str, Chr(62),"&gt;", 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.