Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: XML::Twig Help

by shravnk (Initiate)
on Jul 06, 2010 at 17:17 UTC ( [id://848282]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://848282]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found