in reply to Removing whitespace from deleted items in XML::LibXML
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.
|
|---|