title: XPath String that grabs an element with a specific id value
body: <p>I am trying to create an XPath query/string that grabs a specific element from a XML document. I am attempting to grab the element with the id=38 but my code always returns nothing for some reason.</p>
  
  <p><strong>If you look at my code &amp; the organisation of my XML file can you tell me what XPath I need to grab the element with the id=38?</strong></p>
  
  <p>My code is:</p>
  
  <pre><code>XmlDocument xdoc = new XmlDocument();
  xdoc.Load(getProductURL());
  XmlNode node = xdoc.DocumentElement.SelectSingleNode("id('38')");
  
  // node always is null for some reason?
  </code></pre>
  
  <p>The way the xml is organised is like so:</p>
  
  <pre><code>&lt;courseg&gt;
      &lt;group isempty="False" isbranch="true" id="1" name="abc"&gt;
          &lt;group isempty="False" isbranch="true" id="38" name="def"&gt;&lt;/group&gt;
      &lt;/group&gt;
  &lt;/courseg&gt;
  </code></pre>