Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Mojo::DOM parsing question

by marto (Cardinal)
on Jul 17, 2020 at 08:02 UTC ( #11119448=note: print w/replies, xml ) Need Help??


in reply to Re^2: Mojo::DOM parsing question
in thread Mojo::DOM parsing question

This is just a CSS selector

$dom->find('div.abstract-content > p')->each

Here we are doing a search to find each div, with class abstract-content which has a child <p> tag.

MDN has a nice section on, CSS Selectors, and plenty of other resources too. To quote Child combinator:

"The child combinator (>) is placed between two CSS selectors. It matches only those elements matched by the second selector that are the direct children of elements matched by the first."

The MDN is linked to in the basics section of the overall Mojo documentation, https://mojolicious.org/perldoc. If you have any other questions let me know.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11119448]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2020-10-19 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (207 votes). Check out past polls.

    Notices?