title: "LOADING" SOAP response to DOMDocument
body: <p>After some help from <strong>stackoverflow experts</strong> I have been able to successfully retrieve my response using SOAP. The below piece is how I received and stored the data. <em>This of course is not all the code. I just included this to show how I later reference the xml.</em></p>
  
  <pre><code>With xmlhtp
  webserviceSOAPActionNameSpace = "http://example.com/webservices/"
      .Open "POST", sUrl, False
      .setRequestHeader "POST", "https://onesite.example.com/webservices/stuff.asmx HTTP/1.1"
      .setRequestHeader "Content-Type", "text/xml; charset=utf-8"
      .setRequestHeader "Content-Length", 100
      .setRequestHeader "SOAPAction", webserviceSOAPActionNameSpace &amp; "RetrieveData"
      .send sEnv
      sResult = xmlhtp.statusText
      responseText = xmlhtp.responseText
      ActiveSheet.Cells(1, 1).Value = .responseText
  End With
  Debug.Print responseText
  </code></pre>
  
  <p>Now I am having trouble parsing that out. This seems like it should be pretty simple but I get an error indicating that the responseText I receive above is not "loading" to xmlDOC. The following is at the beginning of the sub:</p>
  
  <pre><code>    Dim xmlhtp As New MSXML2.XMLHTTP
      Dim xmlDoc As New DOMDocument
      Dim XDoc As Object
  </code></pre>
  
  <p>After the With End (shown above) my code looks like this:</p>
  
  <pre><code>Set XDoc = CreateObject("MSXML2.DOMDocument")
  XDoc.async = False: XDoc.validateOnParse = False
  XDoc.Load (xmlhtp.responseText)
  Set lists = XDoc.DocumentElement
  Set getFirstChild = lists.FirstChild
  Debug.Print getFirstChild.XML
  Debug.Print getFirstChild.Text
  </code></pre>
  
  <p>On the line</p>
  
  <pre><code>Set getFirstChild = lists.FirstChild
  </code></pre>
  
  <p>I recieve the following error</p>
  
  <pre><code>Object variable or With block variable not set
  </code></pre>
  
  <p>When I look at the Local Variable window in VBA I can clearly see that nothing was assigned to xmlDoc. So I assume my problem is in XDoc.Load Line.</p>
  
  <p>Any direction would be appreciated.</p>