Re: $format doesn't work in XML::LibXML::Document->toString($format)

Grant McLean <[email protected]> Thu, 24 Feb 2011 13:23:07 +1300
Newsgroups gmane.comp.lang.perl.xml
Message-ID <1298506987.12206.18.camel@putnam>
On Wed, 2011-02-23 at 19:00 -0500, Tom Metro wrote:
> According to:
>   ...
> Yet when I call $doc->toString(1) I get back a string of XML with no
> whitespace between tags.
> 
> I read here:
> http://www.perlmonks.org/index.pl/?node_id=490846
> 
>   In theory, you can call toString(1) to specify you want indents added,
>   but I haven't had any success with that.
> 
> So I'm not the only one who has observed this. But that's an old article
> (2005), and I'm using an older XML::LibXML (1.65 2007) with an equally
> old libxml2 (libxml2-2.6.26 2006). I didn't spot anything relating to
> toString in the libxml2 change log (http://xmlsoft.org/news.html).
> 
> Anyone know if this issue is specific to the old version?

Heh - I wrote that comment :-)

A quick check shows that on my Ubuntu Maverick system with libxml2 2.7.7
and XML::LibXML 1.70, the indenting *does* work as documented.

Regards
Grant


_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs