title: VBScript xmlDoc.save isn't working
body: <p>I'm writing an ASP-classic page using VBScript, and whenever an error writing to the Oracle database occurs, I want to write an xml file and save it to a directory on the webserver.  </p>
  
  <p>Here's what I have:</p>
  
  <pre><code>Sub writeError(error)
      text="&lt;xml&gt;"
      text = text &amp; vbCrLf &amp;"&lt;username&gt;"&amp;currentUser&amp;"&lt;/username&gt;"
      text=text &amp; vbCrLf &amp; "&lt;date&gt;"&amp;Now&amp;"&lt;/date&gt;"
      text=text &amp; vbCrLf &amp; "&lt;error&gt;"&amp;error&amp;"&lt;/error&gt;"
      text=text &amp; vbCrLf &amp; "&lt;xml&gt;"    
  
      set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
      xmlDoc.async=false
      xmlDoc.loadXML(text)
      xmlDoc.Save((Server.MapPath("xml/Error.xml")))
  End sub
  </code></pre>
  
  <p>This takes the username, the current time, and the error message, and is supposed to write it to a file. I've used almost this exact same function before, and it worked just fine, so I'm not sure what's going on here.  Any ideas?</p>