I am using XML::Simple to parse and edit a very large XML file, and speed is essential (so far of all the method's I have tried XML::Simple has been the fastest)
Now once all my edits are completed I print the XML to a document using XMLout(), though it prints it with proper indentation which is nice if this was read by humans but is completely useless in my situation.
The output file without white space is 1.2 Mb with white space it is 15 Mb.
I have been using:
my $string = XMLout($data);
$string =~ s/>[\s]*</></g;
print $out $string;
But it seems to not only be an extreme CPU hog and takes an enormous amount of memory to do.
Is their a way to simply output my XML object as proper XML without all the useless white space?
Thanks