title: msxml Parsing Soap Response using MS DOM and classic asp
body: <p>I am using classic "ASP" dont bea me up.  Just havent been able to make the jump to .Net yet. I am just learning soap and have successfully creates a SOAP request to a webservice.  However, I am unable to figure out how to parse the response and pull out a single node.  I am using MS DOM to load the response into a Document.  I can get the response to screen. I have tried the following but I am unable to get to any nodes_text individually.</p>
  
  <pre><code>'Set the XML Object 
  Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
  
  'Set Asynchoronous = false
  xmlDoc.async = False
  
  'Load the XML file.
  'User Server.MapPath method is the XML is located in your site.
  'Else you can use the absolute path.
  
  xmlDoc.Load (strResult)
  
  'If there is any errors pasring the file the notify
  
  If xmlDoc.parseError.errorCode = 0 Then
  
  Response.Write "Error Parsing XML"
  
  Response.Write  "Rason :" &amp; xmlDoc.parseError.reason &amp; "Error Line: " &amp; xmlDoc.parseError.line
  
  End If
  
  'Get ALL the Elements by the tag name book
  
  Set sessionid = xmlDoc.getElementsByTagName("session_id")
  
  'Now Iterate through the List and Display
  response.write"sessionid ="&amp;sessionid&amp;"&lt;BR&gt;"
   For i = 0 to (sessionid.Length-1)
      Response.Write "session_id " &amp; sessionid.item(i).childNodes(0).text  &amp; "&lt;br/&gt;"
  
  Next
  </code></pre>
  
  <p>Here is a response I am trying to parse</p>
  
  <pre><code>&lt;ns:getSessionResponse xmlns:ns="http://services.axis.openmeetings.org"&gt;
      &lt;ns:return xmlns:ax217="http://basic.beans.data.app.openmeetings.org/xsd" 
                 xmlns:ax218="http://basic.beans.hibernate.app.openmeetings.org/xsd" 
                 type="org.openmeetings.app.hibernate.beans.basic.Sessiondata"&gt;
          &lt;ax218:id&gt;71&lt;/ax218:id&gt;
          &lt;ax218:language_id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /&gt;
          &lt;ax218:organization_id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /&gt;
          &lt;ax218:refresh_time&gt;2010-11-04T15:17:13.717Z&lt;/ax218:refresh_time&gt;
          &lt;ax218:sessionXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /&gt;
          &lt;ax218:session_id&gt;5f0415d9cdb72681816095debf3735de&lt;/ax218:session_id&gt;
          &lt;ax218:starttermin_time&gt;2010-11-04T15:17:13.717Z&lt;/ax218:starttermin_time&gt;
          &lt;ax218:storePermanent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /&gt;
          &lt;ax218:user_id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /&gt;
      &lt;/ns:return&gt;
  &lt;/ns:getSessionResponse&gt;
  </code></pre>
  
  <p>I need to pull the session_id from this pare but just dont seem to be able to do it.  And yes I am looking to move to .NET soon.</p>