Thanks Seth and Graeme, the problem is the program must run on a remote server 
that hasn't installed Tidy.pm, but fortunately it has xsltproc, so I'll try 
Graeme's solution.

BTW, is there any Pascal source code out there to do this?.

Leonardo M. Ramé
http://leonardorame.blogspot.com


--- On Thu, 5/14/09, Seth Grover <sethdgro...@gmail.com> wrote:

> From: Seth Grover <sethdgro...@gmail.com>
> Subject: [fpc-pascal] Re: XML pretty formatter
> To: fpc-pascal@lists.freepascal.org
> Date: Thursday, May 14, 2009, 2:06 PM
> 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
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to