Thread HTML::TreeBuilder || look_down & geschachtelte Listen (2 answers)
Opened by Hagen at 2010-06-21 15:56

topeg
 2010-06-21 16:16
#138630 #138630
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
zuerst suchst du nach "ul" dann gehst du alle kinder durch:

ungetestet:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
($ul) = $tree->look_down("_tag", "ul");
if($ul)
{
  for my $child ($ul->content_list())
  {
    if(ref($child) && $child->tag() eq 'li')
    {
      print $child->as_HTML();
      print print "\n----------------------------------------------\n";
    }
  }
}
else
{print "kein UL gefunden...\n"}

View full thread HTML::TreeBuilder || look_down & geschachtelte Listen