示例#1
0
        public bool HasChildrenStructureWithIndependentContent(HtmlAgilityPack.HtmlNode node)
        {
            var parent = node;

            foreach (var n in node.DescendantsElements())
            {
                if (n.InnerText.Trim() != node.InnerText.Trim())
                {
                    return(false);
                }

                if (this.HasChildrenStructureWithIndependentContent(n))
                {
                    return(false);
                }
            }

            return(true);
        }