title: From XmlDocument To XmlReader .Net
body: <p>After an advice from a user that answered to my question I'm tring to convert my XmlDocument code to XmlReader code but I'm having some troubles.</p>
  
  <p>This is XML (generated from php-mysql Page) </p>
  
  <pre><code>&lt;row&gt;
  &lt;idLink&gt;64&lt;/idLink&gt;
  &lt;idHost&gt;3&lt;/idHost&gt;
  &lt;url&gt;http://www.google.com&lt;/url&gt;
  &lt;/row&gt;
  &lt;row&gt;
  &lt;idLink&gt;68&lt;/idLink&gt;
  &lt;idHost&gt;4&lt;/idHost&gt;
  &lt;url&gt;http://www.bing.com&lt;/url&gt;
  &lt;/row&gt;
  ..... until about 10000 rows
  </code></pre>
  
  <p>This is my XmlDocument code: </p>
  
  <pre><code>   xmlDoc.Load("http://www.myUrl.com/list.php");
        if (xmlDoc.DocumentElement != null){
            foreach (XmlNode node in xmlDoc.DocumentElement)
               {
                if (node.Name == "row")
                  {
                    list.Add(new Links { 
                         idLink = Convert.ToInt32(node.ChildNodes[0].InnerText),
                         idHost = Convert.ToInt32(node.ChildNodes[1].InnerText),
                         url = node.ChildNodes[2].InnerText }); 
                    }
               }  
               return list;
  </code></pre>
  
  <p>Now I have some trouble to Convert in XmlReader, I tried many code but I can't handle it. </p>
  
  <pre><code>using (XmlReader reader = new XmlTextReader("http://myUrl.com/list.php"))
           { 
            if (reader.NodeType == XmlNodeType.Element) 
             ?????
  </code></pre>