title: How to parse an xml string in javascript? (not client-side, browser-related)
body: <p>I was wondering if anybody could point me to a Core (not client-side) JavaScript solution for parsing an xml string. For example, turning it into an object I could pluck properties out of. Or even an array.</p>
  
  <p>I've searched high and low, and all the solutions I see are client-side solutions which make use of a particular browser's DOM. Please note, I am programming in JavaScript, but this is not a DOM-related question. It's a server-side calculation.</p>
  
  <p>For example, I have this string:<br>
  <code>&lt;IndustryTerm count="2" relevance="0.553"&gt;food system&lt;/IndustryTerm&gt;&lt;Person count="2" relevance="0.586"&gt;Alexandra Spieldoch&lt;/Person&gt;&lt;Event count="1"&gt;Environmental Issue&lt;/Event&gt;&lt;IndustryTerm count="1" relevance="0.154"&gt;rural finance&lt;/IndustryTerm&gt;&lt;IndustryTerm count="1" relevance="0.335"&gt;food security&lt;/IndustryTerm&gt;&lt;IndustryTerm count="1" relevance="0.280"&gt;e-consultation&lt;/IndustryTerm&gt;&lt;IndustryTerm count="1" relevance="0.154"&gt;high-level food security dialogues&lt;/IndustryTerm&gt;&lt;IndustryTerm count="1" relevance="0.154"&gt;food markets&lt;/IndustryTerm&gt;&lt;Position count="1" relevance="0.335"&gt;representative&lt;/Position&gt;&lt;SocialTags&gt;&lt;SocialTag importance="2"&gt;Sociology&lt;originalValue&gt;Sociology&lt;/originalValue&gt;&lt;/SocialTag&gt;&lt;SocialTag importance="2"&gt;Food security&lt;originalValue&gt;Food security&lt;/originalValue&gt;&lt;/SocialTag&gt;&lt;SocialTag importance="1"&gt;Food politics&lt;originalValue&gt;Food politics&lt;/originalValue&gt;&lt;/SocialTag&gt;&lt;SocialTag importance="1"&gt;Gender&lt;originalValue&gt;Gender&lt;/originalValue&gt;&lt;/SocialTag&gt;&lt;SocialTag importance="1"&gt;Biology&lt;originalValue&gt;Biology&lt;/originalValue&gt;&lt;/SocialTag&gt;&lt;/SocialTags&gt;</code></p>
  
  <p>My goal is to find all the <em>relevance</em> and <em>importance</em> values, and the associated values between the tags. To be more specific, in this case:</p>
  
  <p><code>&lt;IndustryTerm count="1" relevance="0.154"&gt;food markets&lt;/IndustryTerm&gt;</code></p>
  
  <p>I'd like to know the tag name (IndustryTerm) the relevance (0.154) and the the value between the open and close tags (food markets).</p>
  
  <p>I've been fiddling around with regular expressions, but haven't been able to "hit the spot" yet and was just wondering if there is something out there.</p>
  
  <p>Again, this is not related to client-side JavaScript or browsers, but does need to be in standard, Core JavaScript.</p>
  
  <p>doug</p>