in reply to Re^3: Confusion ,XML::SIMPLE with DATA:DUMPER
in thread Confusion ,XML::SIMPLE with DATA:DUMPER
twig_roots doesen't make an array, it makes a tree, with the document root as the root, and the elements listed in the hash as first children. Then the descendants of those elements compose the rest of the tree. prev_siblings means previous siblings. When you get a reason element, at that poit the tree is made of the root, with the phone elements as children, and the reason element as the last child. $reason->prev_siblings will then return the list of phone numbers. Once you're done printing them, you can get rid of them through the purge method, so they don't interfere with the processing of the next set of data.
Does it make sense?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Confusion ,XML::SIMPLE with DATA:DUMPER
by ultibuzz (Monk) on Nov 21, 2006 at 14:06 UTC |