$format doesn't work in XML::LibXML::Document->toString($format)
Tom Metro <[email protected]> Wed, 23 Feb 2011 19:00:58 -0500
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
According to: http://search.cpan.org/~pajas/XML-LibXML-1.70/lib/XML/LibXML/Document.pod toString is a DOM serializing function... The optional $format parameter sets the indenting of the output. ... If $format is 1, libxml2 will add ignorable white spaces, so the nodes content is easier to read. Existing 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? -Tom _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs