title: JavaScript/jQuery: How do I get an array of all attributes in an XML element?
body: <p>Given an XML element in jQuery like so:</p>
  
  <pre><code>$('&lt;foo oy="vey" foo="bar" here="is" another="attribute" /&gt;')
  </code></pre>
  
  <p>Can I use either jQuery or plain old JavaScript to get an array containing the names of all the attributes in an XML element? I would expect this:</p>
  
  <pre><code>['oy','foo','here','another']
  </code></pre>