Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Extracting HTML content between the h tags

by Gangabass (Vicar)
on Aug 06, 2012 at 01:01 UTC ( #985580=note: print w/replies, xml ) Need Help??


in reply to Re^2: Extracting HTML content between the h tags
in thread Extracting HTML content between the h tags

According to your HTML preceding-sibling for hr will be div tag but not p tag... So this code will find all ps after last h2:
$p->findnodes('//h2[4]/following-sibling::p');
Or (more flexible):
$p->findnodes('//h2[last()]/following-sibling::p');

Replies are listed 'Best First'.
Re^4: Extracting HTML content between the h tags
by vagabonding electron (Chaplain) on Aug 06, 2012 at 15:31 UTC
    Thank you very much!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985580]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2017-02-20 17:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (300 votes). Check out past polls.