Wednesday, 14 August 2013

Ignoring when parsing with HtmlAgilityPack

Ignoring when parsing with HtmlAgilityPack

I'm parsing html table in c# using Html Agility Pack that contains
non-breaking space.
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(page);
Where page is string containing table with special characters  
within text.
<td>&#160;test</td>
<td>number =&#160;123&#160;</td>
Using SelectSingleNode(".//td").InnerText will contains this special
characters but i want to ignore them.
Is there some elegant way to ignore this (with or without help of Html
Agility Pack) without modifying source table?

No comments:

Post a Comment