title: XML select sing node and loop through it
body: <p>I'm having some issues looping through an XML node.</p>
  
  <p>To begin, here is the general format of the XML file:</p>
  
  <pre><code>&lt;Config&gt;
    &lt;Facilities&gt;
      &lt;Facility&gt;
        &lt;ID&gt;1&lt;/ID&gt;
        &lt;Name&gt;Facility Name&lt;/Name&gt;
        &lt;Profiles&gt;
          &lt;Profile&gt;
              &lt;Name&gt;Value&lt;/Name&gt;
              &lt;Item2&gt;Value&lt;/2&gt;
          &lt;/Profile&gt;
          &lt;Profile&gt;
              &lt;Name&gt;Another Value&lt;/Name&gt;
          &lt;/Profile&gt;
        &lt;/Profiles&gt;
      &lt;/Facility&gt;
      &lt;Facility&gt;
        &lt;ID&gt;2&lt;/ID&gt;
        &lt;Name&gt;Facility Name&lt;/Name&gt;
        &lt;Profiles&gt;
          &lt;Profile&gt;
              &lt;Name&gt;Value&lt;/Name&gt;
          &lt;/Profile&gt;
        &lt;/Profiles&gt;
      &lt;/Facility&gt;
    &lt;/Facilities&gt;
  &lt;/Config&gt;
  </code></pre>
  
  <p>And here's the code I'm using:</p>
  
  <pre><code>XmlDocument configFile = new XmlDocument();
  configFile.Load(CONFIG_FILE);
  
  XmlNodeList nodeList = configFile.SelectNodes("/Config/Facilities/Facility[ID[text()='" + facilityID + "']]/Profiles/Profile");
  foreach (XmlNode no in nodeList)
  {
      Console.WriteLine(no["Name"].InnerText);
      //myList.Items.Add(no["Name"].InnerText);
  }
  </code></pre>
  
  <p>Basically, I want to loop through the facilities and select the facility with a specific ID (this id is derived from the <code>facilityID</code> that I set earlier in my code...and yes I've checked, it's being set correctly). I then want to go through the profiles associated with the facility and loop through them. I want to be able to take all the elements in each <code>&lt;Profile&gt;</code> as applicable.</p>
  
  <p>However, when I execute this code, it's not returning anything in the debug console.</p>