Home: Perl Programming Help: Beginner:
Process XML files



Shai
New User

Nov 13, 2012, 6:02 AM


Views: 3656
Process XML files

Hi,

I try to process XML files using XML::Simple. I read the file using XMLin and immediately write it out with XMLout, without any processing.

The destination file is created but the it saved in a different order. Is it possible to keep the order of the original file.

Thanks,

Shai


(This post was edited by Shai on Nov 13, 2012, 7:18 AM)


Laurent_R
Veteran / Moderator

Nov 13, 2012, 9:59 AM


Views: 3647
Re: [Shai] Process XML files

If you juste want to copy the file without any processing, don't use the module, simply copy the lin es one by one.

The module you are using is using hash structures to store your data, and a hash is not keeping the order of its elements, so they will appear in apparently random order.