views:

50

answers:

1

I'm learning how to use the library for the first time and would like some help.

Consider I have this somewhere in my HTMLDocument:

<h1>Casablanca
<span>(<a href="/year/2010/">2010</a>) <span class="pro-link"><a href="http://pro.imdb.com/rg/maindetails-title/tconst-pro-header-link/title/tt1226229/"&gt;More at <strong>IMDbPro</strong></a>&nbsp;»</span><span class="title-extra"></span></span>
</h1>

How can I extract just the Casablanca text, not the span div?

Also, am I correct in thinking that the HtmlNode.InnerText is the text inside of a Div?

A: 

Well, there will be a TextNode as the first child of the H1 node.

YourH1Node.FirstChild.InnerText or something similar...

John Gietzen