in reply to XML::LibXML unbindNode leaves blank lines in the xml file

From an XML perspective, whitespace is data. The following two XML files are not considered to be equivalent:

<foo> <bar /> </foo>

versus

<foo><bar /></foo>

Of course XML is really just a base that other markup formats can layer themselves on top of (RSS, Atom, XHTML, RDF/XML, Docbook, SVG, MathML, etc). Some of those formats may consider whitespace to be insignificant, or significant only in certain places. (For example, in XHTML, whitespace is very significant inside <pre> elements; and the whitespace rules elsewhere are... shall we say "complex".) A general purpose XML processor must consider whitespace to be significant because it has no idea whether the particular flavour of XML you're using considers it important.

So in the examples above, if you remove the <bar> element, a generic XML processor cannot simply remove the whitespace in the first example. It doesn't know whether that whitespace is significant.

And that's why I wrote XML::LibXML::PrettyPrint. It allows you to pass in whitespace-massaging rules to the constructor, and thus reformat XML according to your own set of rules. In your case, configuring it so that <fixed> is a "compact" element, and all others are "block" elements should provide you with the formatting you desire.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name