oilerfan21 has asked for the wisdom of the Perl Monks concerning the following question:
I suspect that what I'm trying to do should be easy, but I'm struggling a little based on the doc and the examples I can find with google. What I need is the full 'element' ( I think that the right term) level3, but only if the 'name' of the element begins with a known string? I also need the output to stay in XML format. I've been playing with XML::Twig and I can with twig_roots get all of the level3 elements, but how can I filter out the ones that aren't named according to my known pattern? Thanks in advance for you time! Oilerfan21<level1> <level2> <level3> <name>blah</name> <rule>...</rule> <rule>...</rule> </level3> <level3> <name>blah2</name> <rule>...</rule> <rule>...</rule> </level3> </level2> </level1>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Twig parsing
by mirod (Canon) on Jun 12, 2008 at 15:41 UTC | |
by oilerfan21 (Initiate) on Jun 12, 2008 at 18:03 UTC |