<?xml version="1.0" encoding="UTF-8"?>
<div class="contentLeft">
<h1>Hello</h1>
<ul id="resultlist" class="stories">
<li>
</li>
</ul>
</div>
I have the following XML file, and I would like to read the "li" entry as follows:
var doc = new HtmlDocument();
doc.Load(path);
var query = "//div[contains(@class,'contentLeft')]//ul";
var childNodes = doc.DocumentNode.SelectSingleNode(query).ChildNodes;
Now I should have an entry in the list - but I have three!
Actually I only expect the "li" entry, does anyone of you know where the two "#text" entries come from?
Here are the dontnetfiddle.net link to my Problem: