title: Classic ASP post and receive XML
body: <p>Hey I've been trying for hours to receive a XML via a classic ASP page but it just wont work. </p>
  
  <p>Here my code:</p>
  
  <p><strong>post.asp</strong></p>
  
  <pre class="lang-vb prettyprint-override"><code>url = "http://myurl.com/receive.asp"
  information = "&lt;Send&gt;&lt;UserName&gt;Colt&lt;/UserName&gt;&lt;PassWord&gt;Taylor&lt;/PassWord&gt;&lt;Data&gt;100&lt;/Data&gt;&lt;/Send&gt;"
  Set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
  xmlhttp.Open "POST", url, false
  xmlhttp.setRequestHeader "Content-Type", "text/xml" 
  xmlhttp.send information
  </code></pre>
  
  <p><strong>receive.asp</strong></p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim objXmlRequest
  Set objXmlRequest = Server.CreateObject("MSXML2.DOMDOCUMENT.3.0")
    objXmlRequest.async = False
    objXmlRequest.setProperty "ServerHTTPRequest", True
    objXmlRequest.validateOnParse = True
    objXmlRequest.preserveWhiteSpace = True
  
  IF objXmlRequest.Load (Request) THEN
    'GET THE REQUEST FROM CLIENT
    strQuery = "//" &amp; "ActionName"
    Set oNode = objXmlRequest.selectSingleNode(strQuery)
    strActionName = oNode.Text
    response.write("success")
  ELSE
      Response.Write "Failed to load XML file, reason: " &amp; objXmlRequest.parseError.reason 
  END IF
  </code></pre>
  
  <p>This error appears:</p>
  
  <pre>
  Failed to load XML file, reason: XML document must have a top level element.
  </pre>
  
  <p>I just don't get it. Also i want to know if there is a posibilty to save the loaded XML?</p>