private static CollectChildrenNodesInnerHtml ( HtmlAgilityPack.HtmlNodeCollection nodesCollection, StringBuilder contentText ) : void | ||
nodesCollection | HtmlAgilityPack.HtmlNodeCollection | |
contentText | StringBuilder | |
return | void |
private static void CollectChildrenNodesInnerHtml(HtmlNodeCollection nodesCollection, StringBuilder contentText)
{
foreach (var childNode in nodesCollection)
{
if (CanIncludeNodeToResults(childNode))
{
if (childNode.ChildNodes != null && childNode.ChildNodes.Count > 0)
{
CollectChildrenNodesInnerHtml(childNode.ChildNodes, contentText);
}
else
{
if (!string.IsNullOrEmpty(childNode.InnerText))
{
contentText.Append(childNode.InnerText);
}
}
}
}
}