http://www.perlmonks.org?node_id=1043415


in reply to Search and Extract from XML when path is unknown

Hi,

I would recommend to also have a look at XML::Parser to solve the issue a little bit more event-driven. You're scanning tags and when the content seems to be the starting point you work on the remaining tags and their content as long as you don't leave the "interesting" subtree . In this case you don't need to know how deep the structure is nested you're looking for.

Best regards
McA