|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: Adding Elements to XMLby Anonymous Monk |
| on Nov 20, 2012 at 23:37 UTC ( #1004821=note: print w/ replies, xml ) | Need Help?? |
|
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 :)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||