title: Versatile xml attribute regex with javascript
body: <p>Basically I have an xml document and the only thing I know about the document is an attribute name.</p>
  
  <p>Given that information, I have to find out if that attribute name exists, and if it does exist I need to know the attribute value.</p>
  
  <p>for example:</p>
  
  <pre><code>&lt;xmlroot&gt;
    &lt;ping zipcode="94588" appincome = "1750" ssn="987654321" sourceid="XX9999" sourcepw="ioalot"&gt;
    &lt;status statuscode="Success" statusdescription="" sessionid="1234" price="12.50"&gt; 
    &lt;/status&gt;
  &lt;/ping&gt;
  &lt;/xmlroot&gt;
  </code></pre>
  
  <p>I have the names appincome and sourceid.  what are the values?</p>
  
  <p>Also if there are two appincome attribute names in the document I need to know that too, but I don't need their values, just that more then one match exists.</p>