XPATH query, HtmlAgilityPack and Extracting Text
Posted
by Soham
on Stack Overflow
See other posts from Stack Overflow
or by Soham
Published on 2010-06-06T17:02:18Z
Indexed on
2010/06/06
18:02 UTC
Read the original article
Hit count: 454
I had been trying to extract links from a class called "tim_new" . I have been given a solution as well.
Both the solution, snippet and necessary information is given here
The said XPATH query was "//a[@class='tim_new']
, my question is, how did this query differentiate between the first line of the snippet (given in the link above and the second line of the snippet).
More specifically, what is the literal translation (in English) of this XPATH query.
Furthermore, I want to write a few lines of code to extract the text written against NSE:
<div class="FL gL_12 PL10 PT15">BSE: 523395 | NSE: 3MINDIA | ISIN: INE470A01017</div>
Would appreciate help in forming the necessary selection query.
My code is written as:
IEnumerable<string> NSECODE = doc.DocumentNode.SelectSingleNode("//div[@NSE:]");
But this doesnt look right. Would appreciate some help.
© Stack Overflow or respective owner