title: How to extract all instances of a specific XML tag attribute using Windows batch
body: <p>I have an XML file and I need to extract </p>
  
  <pre><code>testname
  </code></pre>
  
  <p>from all the instances of</p>
  
  <pre><code>&lt;con:testSuite name="testname" 
  </code></pre>
  
  <p>within the XML file.</p>
  
  <p>I am not quite sure how to approach this, or whether this is possible in batch.</p>
  
  <p>Here is what I have thought so far:</p>
  
  <p>1) Use FINDSTR and store every line that has </p>
  
  <pre><code>&lt;con:testSuite name=
  </code></pre>
  
  <p>in a variable or a temporary file, like this:</p>
  
  <pre><code>FINDSTR /C:"&lt;con:testSuite name=" file.xml &gt; tests.txt
  </code></pre>
  
  <p>2) Somehow use that file or variable to extract the strings</p>
  
  <p>Note that there might be more than one instance of the matching string in the same line.</p>
  
  <p>I am a novice at batch and any help is appreciated.</p>