Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 examining the Monastery: (3)
As of 2014-09-20 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls