So I ran into a most unusual issue, for which I'm assuming the answer is trivial, but for some reason it appears to escape my gaze.
I have the following XML document (Names had been modified to protect the innocent):
I load it as a document, and run multiple searches on it, all return the expected results. Except for the last, simplest one.
I thought my XPath was off, but loading the same XML string as a
What am I doing wrong?
I have the following XML document (Names had been modified to protect the innocent):
<A><B>C</B></A>
I load it as a document, and run multiple searches on it, all return the expected results. Except for the last, simplest one.
doc.DocumentNode.SelectNodes("//B");
returns null. It shouldn't. It should return a single node.I thought my XPath was off, but loading the same XML string as a
System.Xml.Document
and running SelectNodes("//B");
Does indeed return the desired node.What am I doing wrong?