title: vbscript taking XML node values and assigning to variables
body: <p>I am reading in an XML file that contains a set of test results that looks as follows:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;testsuite&gt;
    &lt;build&gt;
      &lt;run&gt;
        &lt;test&gt;
          &lt;index&gt;1&lt;/index&gt;
      &lt;id&gt;1&lt;/id&gt;
      &lt;description&gt;Description 1&lt;/description&gt;
      &lt;result&gt;Pass&lt;/result&gt;
    &lt;/test&gt;
    &lt;test&gt;
      &lt;index&gt;2&lt;/index&gt;
      &lt;id&gt;2&lt;/id&gt;
      &lt;description&gt;Description 2&lt;/description&gt;
      &lt;result&gt;Aborted&lt;/result&gt;
    &lt;/test&gt;
    &lt;test&gt;
      &lt;index&gt;3&lt;/index&gt;
      &lt;id&gt;3&lt;/id&gt;
      &lt;description&gt;Description 3&lt;/description&gt;
      &lt;result&gt;Dependency&lt;/result&gt;
    &lt;/test&gt;
    &lt;test&gt;
      &lt;index&gt;4&lt;/index&gt;
      &lt;id&gt;4&lt;/id&gt;
      &lt;description&gt;Description 4&lt;/description&gt;
      &lt;result&gt;Failed&lt;/result&gt;
    &lt;/test&gt;
  &lt;/run&gt;
  &lt;/build&gt;
  &lt;/testsuite&gt;
  </code></pre>
  
  <p>I can succesfully get the  nodes listed by using the following:</p>
  
  <pre><code> strQuery = "/testsuite/build/run/test/ (id|result)"
   Set nodeslist = xmlDoc.selectNodes(strQuery)
  </code></pre>
  
  <p>And I know to use a for each loop to grab the node values...</p>
  
  <pre><code>For Each objNode In nodeslist
  
  'WHAT TO DO IN HERE...
  
  Next
  </code></pre>
  
  <p>However, I am now stuck at the point where I need to use the id and its associated result. Essentially I will take this information and upload the result to a test system but at the moment I am stuck on how to loop through the 4 separate test nodes and pick out the id and result for each one, ensuring that they remain linked to each other i.e. if they were to be assigned to variables such as ID and RESULT which I could then perform my upload action on before looping back around and re-assigning them to the values within the next test node.</p>
  
  <p>Any help much appreciated.</p>