C# htmlagilitypack get element by xpath
помогите мне получить "Привет, мир"
<table cellpadding="0" cellspacing="0" id="id_tbl" class=" cke_show_border"> <tbody> <tr> <td> <span class="title_editor">Heading</span> </td> </tr> <tr> <td class="content_tbl" id="id_td"> <p align="center" style="text-align:center; margin:0in 0in 0.0001pt"> <span style="font-size:14pt"> <span style="line-height:150%"> <span style="font-family:"Times New Roman",serif"> < b> hello world < /b> </span> </span> </span> </p> </td> </tr> </tbody> </table>
Выражение XPath: //*[@идентификатор="id_td"]/стр./период/период/период/в/текста()
Что я уже пробовал:
Я уже пробовал:
string curUrl = geckoWebBrowser1.Url.ToString(); HtmlWeb web = new HtmlWeb(); HtmlAgilityPack.HtmlDocument doc = web.Load(curUrl); var nodes = doc.DocumentNode.SelectNodes("//*[@id='id_td']/p/span/span/span/b/text()"); richTextBox1.Text = nodes.ToString();
Спасибо!!!!