in reply to Re^2: accessing root tags when using XML::Twig and twig_roots
in thread accessing root tags when using XML::Twig and twig_roots

Couldn't you do two passes against the file? First create a twig with the start_tag_handler to get whatever it is you need. Then use that information to create a second twig for the actual processing. Would that work or am I missing something? As mirod mentions some sample code and data might help clear things up.
  • Comment on Re^3: accessing root tags when using XML::Twig and twig_roots

Replies are listed 'Best First'.
Re^4: accessing root tags when using XML::Twig and twig_roots
by John M. Dlugosz (Monsignor) on May 05, 2006 at 21:14 UTC
    Yes, that is an option, now that I know how to quit once I find what was needed. Someone said that die from a handler will do the trick, presumably without leaving the module in a funny state.