title: Attributes of XML node using Javascript
body: <p>Is there a way to get the name of an attribute of an XML node using javascript.
  Lets take this as a sample XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Employees&gt;     
          &lt;Count name="EmployeeCount"&gt;100&lt;/Count&gt;
          &lt;employee id="9999" &gt;Harish&lt;/employee&gt;
          &lt;Salary&gt;
              &lt;year id="2000"&gt;50 Grands&lt;/year&gt;
              &lt;year id="2001"&gt;75 Grands&lt;/year&gt;    
              &lt;year id="2002"&gt;100 Grands&lt;/year&gt;
          &lt;/Salary&gt;
      &lt;/Employees&gt;
  </code></pre>
  
  <p>I am loading XML using ActiveXObject.As you can see not all elements have attributes.I need to list all attributes like</p>
  
  <pre><code>name
  id
  id
  id
  id
  </code></pre>