in reply to Nested div tag
I have problem in nested div tgs
Nope, your problem is you're not using a tree/DOM/xpath ... htmltreexpather.pl/HTML::TreeBuilder::XPath or xpather.pl/XML::LibXML
If you did your code could become
my @rows = $tree->findnodes(q{ //div[ @class =~ /row/ ] }); for my $row ( @rows ){ my @cells = $row->findnodes(q{ //div[ @class =~ /cell/ ] }); for my $cell ( @cells ){ Dance( $cell ); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Nested div tag
by perlmad (Sexton) on Jul 21, 2016 at 05:51 UTC | |
by Anonymous Monk on Jul 21, 2016 at 06:14 UTC | |
by perlmad (Sexton) on Jul 21, 2016 at 06:18 UTC | |
by Anonymous Monk on Jul 21, 2016 at 07:07 UTC | |
by perlmad (Sexton) on Jul 21, 2016 at 10:32 UTC | |
|