racker/node-elementtree — pull request #3 by dpogue (2012-07-22 06:02:12+00:00)
Title: Pretty Printing functionality

This allows you to pass {prettyprint: true} in the options to ElementTree.write, which will cause the output to include line breaks and indentation.

One use case for this is XML config files that can be autogenerated, but also edited by hand. Currently the resulting output from elementtree is all on one line, making it difficult to hand-modify and inspect the config values.

I'm aware that this is a very primitive implementation, and if you have suggestions to improve it then I'd be happy to rework it.