title: Parse XML string using C#
body: <p>I need to parse a simple XML string using C#</p>
  
  <pre><code>&lt;items&gt;
      &lt;item1 value="value1" /&gt;
      &lt;item2 value="value2" /&gt;
      &lt;item3 value="value3" /&gt;
      &lt;itme4 value="value4" /&gt;
      &lt;item5 value="value5" /&gt;
      &lt;itme6 value="value6" /&gt;
  &lt;/items&gt;
  </code></pre>
  
  <p>I'm trying to do it as follow:</p>
  
  <pre><code>    XMLParser XMLParserObj = new XMLParser();
      XmlDocument xmlDoc = new XmlDocument();
      xmlDoc.LoadXml(xmlString);
  
     string item1 = xmlDoc.Attributes.GetNamedItem("item1").Value;
     string item2 = xmlDoc.Attributes.GetNamedItem("item2").Value;
     string item3 = xmlDoc.Attributes.GetNamedItem("item3").Value;
     string item4 = xmlDoc.Attributes.GetNamedItem("item4").Value;
     string item5 = xmlDoc.Attributes.GetNamedItem("item5").Value;
     string item6 = xmlDoc.Attributes.GetNamedItem("item6").Value;
  </code></pre>
  
  <p>with no luck</p>
  
  <p>please advise..</p>