Skip to content Skip to sidebar Skip to footer

C# - Get The Text Inside Tags Using Html Agility Pack

I have used the following code to parse HTML document & store it as CSV file. string actuald=null; string data1 = File.ReadAllText('E://text.html'); HtmlDocument doc = new Html

Solution 1:

To get text inside a node:

actuald = node.InnerText;

To get text including the HTML tags

actuald = node.InnerHtml;

Post a Comment for "C# - Get The Text Inside Tags Using Html Agility Pack"