Display each XML attribute separately
<p>Basically, I have a small issue trying to display each attibute seperetly when I play it, it seems to display all the attributes in title.  I thought you could sort of take the same approach as you do with arrays by writing something like</p>

<pre><code>listView1.Items.Add(items[0]);
</code></pre>

<p>I am completly new to this so i apoligize if the question sounds noobish.</p>

<p>xml file:</p>

<pre><code>&lt;books&gt;
  &lt;type&gt;
    &lt;price&gt;2.50&lt;/price&gt;
    &lt;title&gt;Harry&lt;/title&gt;
  &lt;/type&gt;
  &lt;type&gt;
    &lt;price&gt;2.70&lt;/price&gt;
    &lt;title&gt;bob&lt;/title&gt;
  &lt;/type&gt;
&lt;/books&gt;
</code></pre>

<p>Code:</p>

<pre><code>XmlTextReader reader = new XmlTextReader("XMLfile1.xml");
XmlNodeType type;

while(reader.Read())
{
  type = reader.NodeType;
  if (type == XmlNodeType.Element)
  {
    if (reader.Name == "title")
    {
      reader.Read();
      listView1.Items.Add(reader.Value);
    }
  }
}
reader.Close();
</code></pre>
