private static bool IsTextNode(HtmlNode node, IXmlTextNodeMode textNodeMode) { if (textNodeMode == IXmlTextNodeMode.Exact) { return(node.NodeType == HtmlNodeType.Text); } else { return(node.NodeType == HtmlNodeType.Text || (node.NodeType == HtmlNodeType.Element && node.ChildNodes.Count == 1 && node.FirstChild.NodeType == HtmlNodeType.Text)); } }
public bool IsTextNode(IXmlTextNodeMode textNodeMode) { return(IsTextNode(_node, textNodeMode)); }
public bool IsValuableTextNode(IXmlTextNodeMode textNodeMode) { return(IsTextNode(textNodeMode) && !string.IsNullOrEmpty(GetTextNode(_node).InnerHtml.Trim())); }
public bool IsHierarchyNode(IXmlTextNodeMode textNodeMode) { return(_node.ChildNodes.Any(child => !IsTextNode(child, textNodeMode))); }