in reply to Re: Extracting HTML content between the h tags
in thread Extracting HTML content between the h tags
Thank you a lot! I did not know this syntax.
One more question if I dare :-)
In about 10 pages the last h2-tag is missing, so that I used the following workaround:
I understood the syntax so: "search the siblings but stop if the tag in brackets appears". Is this correct? If so, what am I doing false with the above attempt?
Spasibo!
One more question if I dare :-)
In about 10 pages the last h2-tag is missing, so that I used the following workaround:
I tried the same with your syntax as:my @solution_2 = $content->findvalues( './h2[4]/preceding-sibling::*' +); unless ( @solution_2 ) { @solution_2 = $content->findvalues( '//hr/preceding-sibling::*' ); }
but I get an uninitialized value only.@solution_2 = $content->findvalues( '//hr/preceding-sibling::p[precedi +ng-sibling::h2[3]]' );
I understood the syntax so: "search the siblings but stop if the tag in brackets appears". Is this correct? If so, what am I doing false with the above attempt?
Spasibo!
In Section
Seekers of Perl Wisdom