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

New Post: Children nodes

$
0
0

I am analyzing the timetable of a bus company. I get the necessary data from its website. A node of a bus stop looks like this:

<tr data-stopcode="F01093">
    <td>5</td>
    <td ><span>Fifth street</span></td>
</tr>

I have this node in "hmln" and would like to get the name of the stop. I tried two method but only the first was working. Can you tell me what is wrong with the second one?
Working:
hmln.Elements("td").Last().FirstChild.InnerText
Not Working: -> "Object reference not set to an instance of an object."
hmln.LastChild.FirstChild.InnerText


Viewing all articles
Browse latest Browse all 655

Trending Articles



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