Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: get text from node - XML::LibXML

by sundialsvc4 (Abbot)
on Jul 21, 2018 at 04:06 UTC ( #1218985=note: print w/replies, xml ) Need Help??


in reply to get text from node - XML::LibXML

A more generalized way to extract content from an XML document is XPath expressions, and a good Perl XML::LibXML mini tutorial on it can be found at
https://grantm.github.io/perl-libxml-by-example/xpath.html.

The advantage of this approach is that it is basically akin to “querying” the XML document, which neatly avoids you having to write your own procedural (Perl) logic to try to do the same thing.   The XPath essentially describes what you want, and it’s up to LibXML to find it for you.   (XPath is an industry-standard technology that is by no means limited to Perl.)

2018-07-23 Athanasius linkified references to module and github.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2019-12-09 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?