laziness, impatience, and hubris | |
PerlMonks |
Re: Removing whitespace from deleted items in XML::LibXMLby tobyink (Canon) |
on Dec 08, 2011 at 23:25 UTC ( [id://942519]=note: print w/replies, xml ) | Need Help?? |
As others have said, a blank line is not being inserted. Your data is: ELEMENT LINEFEED ELEMENT LINEFEED ELEMENT and you're removing the middle element, leaving just: ELEMENT LINEFEED LINEFEED ELEMENT The two linefeeds in a row give you an empty line. If whitespace is not considered meaningful in your XML format, you could simply choose to ignore the issue. But if getting the whitespace right is important to you, then you could take a look at my XML prettyprinting module, XML::LibXML::PrettyPrint.
In Section
Seekers of Perl Wisdom
|
|