示例#1
0
 public static HtmlNode FindFirst(HtmlNodeCollection items, string name)
 {
     foreach (HtmlNode current in items)
     {
         if (current.TagName.ToLowerFast().Contains(name))
         {
             HtmlNode result = current;
             return(result);
         }
         if (current.HasChildNodes)
         {
             HtmlNode htmlNode = HtmlNodeCollection.FindFirst(current.ChildNodes, name);
             if (htmlNode != null)
             {
                 HtmlNode result = htmlNode;
                 return(result);
             }
         }
     }
     return(null);
 }
示例#2
0
 public HtmlNode FindFirst(string name)
 {
     return(HtmlNodeCollection.FindFirst(this, name));
 }