Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: SelectNodes non-standard behaviour

$
0
0
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):
<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?

Viewing all articles
Browse latest Browse all 655

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>