Hello all
I've written a Perl script using XML::Simple to parse an XML file generated from a program running under a UNIX line command.
The file is over 50K lines longs and I need to parse 2 of them.
The problem is the time required. It is taking around 15 minutes just to convert the XML file to a hash. Once that's done, all my pointers and loops etc are taking only a second or two, so I'm happy with that.
The commands in question have an option as to whether they output the normal, human-readable format or XML. I wanted to use XML as occasionally a new release of software will move column positions or increase field widths. XML seemed a nice way around formatting changes.
I looked on CPAN for some XML modules and unfortunately there are too many for me to re-write the Perl to time each one of them.
I was hoping someone had an idea as to the speediest way to parse the files
Thanks in advance
I've written a Perl script using XML::Simple to parse an XML file generated from a program running under a UNIX line command.
The file is over 50K lines longs and I need to parse 2 of them.
The problem is the time required. It is taking around 15 minutes just to convert the XML file to a hash. Once that's done, all my pointers and loops etc are taking only a second or two, so I'm happy with that.
The commands in question have an option as to whether they output the normal, human-readable format or XML. I wanted to use XML as occasionally a new release of software will move column positions or increase field widths. XML seemed a nice way around formatting changes.
I looked on CPAN for some XML modules and unfortunately there are too many for me to re-write the Perl to time each one of them.
I was hoping someone had an idea as to the speediest way to parse the files
Thanks in advance