Skip Menu |

This queue is for tickets about the XML-Tidy CPAN distribution.

Report information
The Basics
Id: 9504
Status: resolved
Worked: 15 min
Priority: 0/
Queue: XML-Tidy

People
Owner: Pip [...] CPAN.Org
Requestors: lee.goddard [...] bbc.co.uk
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.0.4C8K1Ah
  • 1.0.4C9JpoP
  • 1.0.4CAJna1
  • 1.2.4CCJW4G
  • 1.2.51HM2ae
Fixed in: 1.2.54HJnFa



Subject: String input, string output?
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) ? Thanks in anticipation lee
Date: Fri, 7 Jan 2005 11:59:03 -0800
From: Pip Stuart <pipstuart [...] gmail.com>
To: bug-XML-Tidy [...] rt.cpan.org
Subject: Re: [cpan #9504] String input, string output?
RT-Send-Cc:
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
This has been fixed since version 1.2.54HDR1G with the toString() member function. -Pip@CPAN.Org
Well maybe that version was not released publicly or was deleted from the CPAN in favor of the newer version but the latest one should still resolve this issue. -Pip@CPAN.Org
Oops. Somehow that reply re-opened the bug. =( -Pip@CPAN.Org