Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Okay...I need help !
I have a XML file named "abc.xml" as follows.
#########################################
<?xml version="1.0" encoding="UTF-8"?> <system> <header></header> <class> <name>Eight</name> <strength>8</strength> </class> <class> <name>Four</name> <strength>4</strength> </class> <class> <name>Ten</name> <strength>10</strength> </class> <class> <name>One</name> <strength>1</strength> </class> <footer></footer> </system>
##############################################
Now I want to create another XML file named "xyz.xml" which is sorted on the basis of "strength count". And the new XML file should look like this.
##############################################
<?xml version="1.0" encoding="UTF-8"?> <system> <header></header> <class> <name>One</name> <strength>1</strength> </class> <class> <name>Four</name> <strength>4</strength> </class> <class> <name>Eight</name> <strength>8</strength> </class> <class> <name>Ten</name> <strength>10</strength> </class> <footer></footer> </system>
##############################################
Any idea how can it can be done.
Thanks in advance!
Regards,
Cherry
Code tags added by GrandFather
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sort n Create XML
by b4swine (Pilgrim) on Aug 20, 2007 at 08:05 UTC | |
Re: Sort n Create XML
by holli (Abbot) on Aug 20, 2007 at 09:12 UTC | |
Re: Sort n Create XML
by misc (Friar) on Aug 20, 2007 at 09:41 UTC | |
Re: Sort n Create XML
by roman (Monk) on Aug 20, 2007 at 11:00 UTC | |
Re: Sort n Create XML
by Samy_rio (Vicar) on Aug 20, 2007 at 09:12 UTC |