[Charlotte.PM] Tidying HTML output / Temp Files
William McKee
william at knowmad.com
Thu Apr 21 14:03:12 PDT 2005
On Thu, Apr 21, 2005 at 09:23:55AM -0400, Cory Foy wrote:
> The solution I have was to get the content back, write it to a temp
> file, make an external call to Tidy telling it to write back to the
> file, and then re-reading in the file. It looks like:
That looks like it would work. However, you may prefer to use HTML::Tidy
which would not require an external file to do the cleanup (from my
reading of the POD). The qestion would then be can XML::XPath work with
a string or does it require a file. I'd strongly suggest using either
the File::Temp module that Diona suggested or IO::File which has a
tmpnam function that can create a temporary file.
William
--
Knowmad Services Inc.
http://www.knowmad.com
More information about the charlotte
mailing list