Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 browsing the Monastery: (7)
As of 2015-08-01 03:36 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 (285 votes), past polls