title: Easy XPathNavigator GetAttribute
body: <p>Just getting started here with my first take at <code>XPathNavigator</code>.</p>
  
  <p>This is my simple xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
  &lt;theroot&gt;
      &lt;thisnode&gt;
          &lt;thiselement visible="true" dosomething="false"/&gt;
          &lt;another closed node /&gt;
      &lt;/thisnode&gt;
  
  &lt;/theroot&gt;
  </code></pre>
  
  <p>Now, I am using the <code>CommonLibrary.NET</code> library to help me a little:</p>
  
  <pre><code>    public static XmlDocument theXML = XmlUtils.LoadXMLFromFile(PathToXMLFile);
  
      const string thexpath = "/theroot/thisnode";
  
      public static void test() {
          XPathNavigator xpn = theXML.CreateNavigator();
          xpn.Select(thexpath);
          string thisstring = xpn.GetAttribute("visible","");
          System.Windows.Forms.MessageBox.Show(thisstring);
      }
  </code></pre>
  
  <p>Problem is that it can't find the attribute.  I've looked through the documentation at MSDN for this, but can't make much sense of what's happening.</p>