Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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');


Comment on Re^3: Extracting HTML content between the h tags
Select or Download Code
Re^4: Extracting HTML content between the h tags
by vagabonding electron (Hermit) 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2015-07-02 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (46 votes), past polls