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

Re^2: finding XPATH for any node in a XML file

by Anonymous Monk
on Apr 20, 2012 at 15:26 UTC ( #966211=note: print w/ replies, xml ) Need Help??


in reply to Re: finding XPATH for any node in a XML file
in thread finding XPATH for any node in a XML file

1.

use XML::Twig ; XML::Twig->new( twig_handlers => { '*' => sub { print $_->xpath, "\n"; }, }, )->xparse( "somefile.xml" );

2.

use XML::Twig ; XML::Twig->new( start_tag_handlers => { '_all_' => sub { print $_->xpath, "\n"; }, }, )->xparse( "somefile.xml" );


Comment on Re^2: finding XPATH for any node in a XML file
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (14)
As of 2014-12-18 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (61 votes), past polls