Thread Platzhalter für HTML-Ausdrücke (reguläre Ausdrücke)
(47 answers)
Opened by vitopetre at 2010-04-02 09:42
versuch mal den treebuilder mit XPath:
Code (perl): (dl
)
1 2 3 4 use HTML::TreeBuilder::XPath; my $tree = HTML::TreeBuilder::XPath->new; $tree->parse_file( "h4.html"); my $h = $tree->findvalue('//h4[@style="float:left"]/following-sibling::p'); Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wie frage ich & perlintro brian's Leitfaden für jedes Perl-Problem |