Esempio n. 1
0
 public static void RemoveQuotes(HtmlAgilityPack.HtmlNode node)
 {
     foreach (var n in node.SelectNodes("descendant::td[@class='alt2']") ?? new HtmlAgilityPack.HtmlNodeCollection(node))
     {
         HtmlAgilityPack.HtmlNode div = n.ParentNode.ParentNode.ParentNode;
         div.Remove();
     }
 }
Esempio n. 2
0
        public void ReplaceElementWithContents(HtmlAgilityPack.HtmlNode elem)
        {
            try
            {
                List <HtmlAgilityPack.HtmlNode> nodos = new List <HtmlAgilityPack.HtmlNode>();
                foreach (HtmlAgilityPack.HtmlNode n in elem.ChildNodes)
                {
                    nodos.Add(n);
                }

                foreach (HtmlAgilityPack.HtmlNode n in nodos)
                {
                    elem.ParentNode.InsertBefore(n, elem);
                }

                elem.Remove();
            }
            catch
            {
            }
        }
Esempio n. 3
0
 public void Remove()
 {
     _htmlNode.Remove();
 }