How to manage xmlns to be able to execute an xpath query?
<p>I would like to get some specific values in a (x)html file using an xpath statement.<br>
I read the html file like an xml file using the xmlDocument class.<br>
Problem is that my xpath query doesn't work because of the namespace defined in the html tag:</p>

<pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
</code></pre>

<p>If I remove the xmlns in the html tag, it works fine.<br>
What's wrong?
(I don't want to use the Html Agility Pack)<br>
Thanks!<br>
Here's my code:</p>

<pre><code>XmlDocument readDoc = new XmlDocument();
System.Xml.XmlNamespaceManager xmlnsManager = new System.Xml.XmlNamespaceManager(readDoc.NameTable);
readDoc.XmlResolver = null;
xmlnsManager.AddNamespace("html", "http://www.w3.org/1999/xhtml");
readDoc.Load("myHTML.html");
int count = readDoc.SelectNodes("//html/body/div/span[@class='layout']",xmlnsManager).Count;
</code></pre>
