title: XPath not working
body: <p>I am trying to read the entitysets within the EDMX file from Entity Framework.</p>
  
  <p>The EDMX file (XML format) has the following layout:</p>
  
  <pre><code>&lt;edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx"&gt;
     &lt;edmx:Runtime&gt;
        &lt;edmx:ConceptualModels&gt;
           &lt;Schema Namespace="Model" Alias="Self" p1:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:p1="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"&gt;
                 &lt;EntityContainer Name="EntityModel" p1:LazyLoadingEnabled="true"&gt;
                    &lt;EntitySet Name="TableName" EntityType="Model.TableName" /&gt;
  </code></pre>
  
  <p>I am using following XPath to get all EntitySet Nodes within the EntityContainer:</p>
  
  <pre><code>/edmx:Edmx/edmx:Runtime/edmx:ConceptualModels/Schema/EntityContainer/EntitySet
  </code></pre>
  
  <p>but I am getting no result with this C# code:</p>
  
  <pre><code>XmlDocument xdoc = new XmlDocument("pathtoedmx");
  var ns = new XmlNamespaceManager(xdoc.NameTable);
  ns.AddNamespace("edmx", "http://schemas.microsoft.com/ado/2009/11/edmx");
  ns.AddNamespace("annotation", "http://schemas.microsoft.com/ado/2009/02/edm/annotation");
  ns.AddNamespace("p1", "http://schemas.microsoft.com/ado/2009/02/edm/annotation");
  ns.AddNamespace("", "http://schemas.microsoft.com/ado/2009/11/edm");
  var entitySets = xdoc.SelectNodes("/edmx:Edmx/edmx:Runtime/edmx:ConceptualModels/Schema/EntityContainer/EntitySet", ns);
  </code></pre>
  
  <p>Already got the XPath from this tool (<a href="http://qutoric.com/xmlquire/" rel="nofollow">http://qutoric.com/xmlquire/</a>), because I started not trusting my own XPath skills but it tells me the same XPath I was already using.</p>
  
  <p>If I remove the <strong>"/Schema/EntityContainer/EntitySet"</strong> part its finding the <strong>"/edmx:Edmx/edmx:Runtime/edmx:ConceptualModels"</strong>, but not further on already tried to specify the "edmx" namespace ("edmx:/Schema") but no difference.</p>
  
  <p>Hope you can help me out, already banging my head against the table. :)</p>