[fpc-pascal] Re: XML pretty formatter
Seth Grover
sethdgrover at gmail.com
Thu May 14 19:06:46 CEST 2009
I don't know what your requirements are for platform/language, but
this works nicely for me:
------------------------------
#!/usr/bin/perl
use XML::Tidy;
my $xmlFile = '/path/to/filename';
my $tidy_obj = XML::Tidy->new('filename' => $xmlFile);
$tidy_obj->tidy();
$tidy_obj->write();
------------------------------
>
> Hi, I'm looking for a simple XML pretty formatter, or parser who can remove all superfluous characters from XML files.
>
> My application receives an XML file from an external app. containing many spaces and CRLFs after closing tags, this doesn't affect my parser, but I need to add the XML to a log file and those spaces make very difficult to read the logs.
>
> Thanks in advance.
>
> Leonardo M. Ramé
--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.
Seth Grover
sethdgrover[at]gmail[dot]com
More information about the fpc-pascal
mailing list