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

New Post: Children nodes

$
0
0

Ok..
What about

AP.HtmlDocument hp = new AP.HtmlDocument();
hp.LoadHtml("<tr data-stopcode=\"F01093\"><td>5</td><td ><span>Fifth street</span></td></tr>");

var nodes = hp.DocumentNode.SelectNodes("//tr[@data-stopcode]");
foreach (AP.HtmlNode node in nodes)
{
    string stopcode = node.Attributes["data-stopcode"].Value;
    string stopname = node.SelectSingleNode(".//span").InnerText;
    string stoptime = node.SelectSingleNode(".//td[position()=1]").InnerText;
}

any better?


Viewing all articles
Browse latest Browse all 655

Trending Articles



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