Thread HTML::TreeBuilder || look_down & geschachtelte Listen
(2 answers)
Opened by Hagen at 2010-06-21 15:56
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"} |