On Fri, 7 Jan 2005 08:01:52 -0500 (EST), via RT
<bug-XML-Tidy@rt.cpan.org> wrote:
Show quoted text> This message about XML-Tidy was sent to you by LGODDARD <LGODDARD@cpan.org> via rt.cpan.org
>
> Full context and any attached attachments can be found at:
> <URL:
https://rt.cpan.org/Ticket/Display.html?id=9504 >
>
> Perhaps an oversight in the POD or code, rather than a bug: is there an equivalent to $tidy_obj->write() for use with XML::Tidy->new(xml=>$string_of_xml) ?
Hello Lee,
I have not included such a function but obviously one would be
useful so I'll include it in my next release. In the meantime, the
following should accomplish the same:
my $tidy_obj = XML::Tidy->new('xml' => $string_of_xml);
my($root) = $tidy_obj->findnodes('/');
my $new_string_of_xml = qq(<?xml version="1.0" encoding="utf-8"?>\n);
$new_string_of_xml .= $_->toString() . "\n" foreach($root->getChildNodes());
Show quoted text> Thanks in anticipation
You're welcome. =)
Show quoted text> lee
-Pip