title: Read xml node attribute
body: <p>I have an xml document that have nodes like this, <code>&lt;ITEM id="1" name="bleh"... /&gt;</code>
  What I want to do is get all id's attribute value for each ITEM node that exists in the document.</p>
  
  <h2>So, how can I do that?</h2>
  
  <p>Edit: I've tried this way and it didn't works:</p>
  
  <pre><code>XmlDocument Doc = new XmlDocument();
          Doc.Load("example.xml");
          XmlNodeList nodeList = Doc.SelectNodes("/ITEM");
          foreach (XmlNode node in nodeList)
          {
              string id = node.Attributes["id"].Value;
              Console.WriteLine(id);
          }
  </code></pre>