laziness, impatience, and hubris | |
PerlMonks |
XML::Twig and whitespacesby DJpumps (Novice) |
on Aug 23, 2007 at 14:28 UTC ( [id://634644]=perlquestion: print w/replies, xml ) | Need Help?? |
DJpumps has asked for the wisdom of the Perl Monks concerning the following question:
I'm using XML::Twig and have noticed that it replaces white-space characters to spaces. Something like s/\s/ /g on all attribute and element values.
See example code: The expected output (contents of the scalar $text is the word space followed by a single space character, followed by the word tab, followed by a single tab character, followed by the word newline, followed by a single newline character, and then the word end. Instead, the tab and the newline characters were replaced by a single space character each.
This relates to XML::Twig 3.29 and XML::Twig 3.30. I did not check this behavior in other versions of XML::Twig Thanks.
--
DJpumps
Back to
Seekers of Perl Wisdom
|
|