Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Adding Elements to XML

by Anonymous Monk
on Nov 20, 2012 at 23:37 UTC ( #1004821=note: print w/replies, xml ) Need Help??


in reply to Adding Elements to XML

SO FAR

Well, naturally, appendChild adds one to the end, perhaps you want  $root->insertBefore( $newNode, $root->firstChild );

RESULTS I WANT

You may not have a choice, but if you do, you should think about WANTing a different xml structure :) for example, one that isn't so recursive -- one where the definitions are children (not siblings) of keys -- its a dictionary :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004821]
help
Chatterbox?
[thezip]: oops... My mind is backwards (this works): find . -mindepth 2 -name "*.csv" | xargs wc -l

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2016-12-06 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (113 votes). Check out past polls.