title: How do I use XPath with a default namespace with no prefix?
body: <p>What is the XPath (in C# API to XDocument.XPathSelectElements(xpath, nsman) if it matters) to query all MyNodes from this document?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;MyNode xmlns="lcmp" attr="true"&gt;
      &lt;subnode /&gt;
    &lt;/MyNode&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <ul>
  <li>I tried <code>/configuration/MyNode</code> which is wrong because it ignores the namespace.</li>
  <li>I tried <code>/configuration/lcmp:MyNode</code> which is wrong because <code>lcmp</code> is the URI, not the prefix.</li>
  <li>I tried <code>/configuration/{lcmp}MyNode</code> which failed because <code>Additional information: '/configuration/{lcmp}MyNode' has an invalid token.</code></li>
  </ul>
  
  <p>EDIT: I can't use <code>mgr.AddNamespace("df", "lcmp");</code> as some of the answerers have suggested.  That requires that the XML parsing program know all the namespaces I plan to use ahead of time.  Since this is meant to be applicable to any source file, I don't know which namespaces to manually add prefixes for.  It seems like <code>{my uri}</code> is the XPath syntax, but Microsoft didn't bother implementing that... true?</p>