in reply to 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" ); [download]
2.
use XML::Twig ; XML::Twig->new( start_tag_handlers => { '_all_' => sub { print $_->xpath, "\n"; }, }, )->xparse( "somefile.xml" ); [download]