|Perl: the Markov chain saw|
xml using XML::Simple reording of XML-Contentby tobias_hofer (Friar)
|on Jun 17, 2013 at 11:45 UTC||Need Help??|
tobias_hofer has asked for the
wisdom of the Perl Monks concerning the following question:
I got this following problem:
I got a hash which I want to get into xml. My problem is that the content (keys) of the hash are ordered alphabetically. Thus the content comes into a different order to file. This is not a problem to xml itself but a problem for the tool-chain following my perl script, which expects things to be in a specific order
My hash is generated and looks in the end like this
and it comes it this order to xml
but the tool requires it in a different order:
Therefore it would be simplest to reorder the sequence of keys in the hash.. i.e. like that:
Is this somehow possible to do? I tried to create the hash once more in a different order but this does not work.
Any help is highly welcome!