The third party library “HtmlAgilityPack” will give the feature to get the inner text of html code.
StringBuilder strBuilder = new StringBuilder();
HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
htmlDoc.LoadHtml(“<html code>”);
foreach(HtmlAgilityPack.HtmlNode node in htmlDoc.DocumentNode.ChildNodes)
{
strBuilder.Append(node.InnerText);
}
return strBuilder.ToString();
No comments:
Post a Comment