Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Confusion ,XML::SIMPLE with DATA:DUMPER

by ultibuzz (Monk)
on Nov 21, 2006 at 09:06 UTC ( #585220=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Confusion ,XML::SIMPLE with DATA:DUMPER
in thread Confusion ,XML::SIMPLE with DATA:DUMPER

i have some questions left to understand this.
with twig_roots it will make me an array if more then 1 entry is presented ?
$reason->prev_siblings points to that array so the script process it one by one
what means prev_siblings ?
kd ultibuzz


Comment on Re^3: Confusion ,XML::SIMPLE with DATA:DUMPER
Re^4: Confusion ,XML::SIMPLE with DATA:DUMPER
by mirod (Canon) on Nov 21, 2006 at 12:47 UTC

    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?

      yep thx, now i understand this twig_root and the rest
      thx ultibuzz

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-10-01 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (9 votes), past polls