<p>This is a sample (edited slightly, but you get the idea) of my XML file:</p>

<pre><code>&lt;HostCollection&gt;
  &lt;ApplicationInfo /&gt;
  &lt;Hosts&gt;
    &lt;Host&gt;
      &lt;Name&gt;Test&lt;/Name&gt;
      &lt;IP&gt;192.168.1.1&lt;/IP&gt;
    &lt;/Host&gt;
    &lt;Host&gt;
      &lt;Name&gt;Test&lt;/Name&gt;
      &lt;IP&gt;192.168.1.2&lt;/IP&gt;
    &lt;/Host&gt;
  &lt;/Hosts&gt;
&lt;/HostCollection&gt;
</code></pre>

<p>When my application (VB.NET app) loads, I want to loop through the list of hosts and their attributes and add them to a collection. I was hoping I could use the XPathNodeIterator for this. The examples I found online seemed a little muddied, and I'm hoping someone here can clear things up a bit.</p>

You could load them into an XmlDocument and use an XPath statement to fill a NodeList...
```
```
Dim doc As XmlDocument = New XmlDocument()
doc.Load("hosts.xml")
Dim nodeList as XmlNodeList
nodeList = doc.SelectNodes("/HostCollectionInfo/Hosts/Host")
```
```
Then loop through the nodes