in reply to Re: XML::Twig Help
in thread XML::Twig Help

mirod:

This has been enormously helpful, and your code works when I process one tree at a time. However, the xml doc that I am trying to work with contains hundreds of trees with the same format. How can I get the XML::Twig module to iterate over many trees within one document. (This will be my last question, I promise)

Thanks again

shravnk

Replies are listed 'Best First'.
Re^3: XML::Twig Help
by AndyZaft (Hermit) on Jul 06, 2010 at 18:13 UTC
    There should not be more than 1 root element in a proper XML file. If that is what you mean by "many trees", otherwise mirod has a few posts here on pm regarding how to process XML in chunks. When I started with XML::Twig, I read all his posts here and that answered every question. If you have perldoc, you can look at the twig page and search for flush and purge. I can't seem to reach xmltwig.com for the last week from around here, so I can't link those examples.