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

New Post: How to get values from node like this

$
0
0

Hello,

I need help with getting strings from html page like this:

<ul id='listahasel'>
 <li>
 <div><b class='glowka'><a href='/slownik/2454594/dupa'>dupa</a></b>
 <div><B>1. </B><I><abbr title='wulgarny, wulgarne'>wulg.</abbr></I> &#171;część ciała, na której się siada&#187;</div>
 <div><B>2. </B><I><abbr title='wulgarny, wulgarne'>wulg.</abbr></I> &#171;narząd płciowy&#187;</div>
 <div><B>3. </B><I><abbr title='wulgarny, wulgarne'>wulg.</abbr></I> &#171;o młodej, atrakcyjnej seksualnie kobiecie&#187;</div>
 <div><B>4. </B><I><abbr title='wulgarny, wulgarne'>wulg.</abbr></I> &#171;o czyjejś dziewczynie, kobiecie jako partnerce seksualnej&#187;</div>
 <div><B>5. </B><I><abbr title='wulgarny, wulgarne'>wulg.</abbr></I> &#171;o człowieku niezaradnym&#187;</div>&#8226; <B>dupsko</B></div>
 </li>
</ul>

I get this from whole webpage by :

HtmlNodeCollection nodes = test.DocumentNode.SelectNodes("//ul[@id=\"listahasel\"]" );

  

 

 

 

  

foreach (var col in  nodes) 

{ var wezel = col.SelectSingleNode("*");

 string wynik = wezel.InnerText;

 

 Console.WriteLine(wynik);

 

}

 but I need to can get to the blue values? how to do this ?


Viewing all articles
Browse latest Browse all 655

Trending Articles