I've been working with the Scala programming language for some months now, using it for processing XML. When I generate XML, I need to have it formatted in an appropriate fashion, because
- clients expect the XML for be layed out nicely, and not look higgledy-piggledy, or
- I need to compare different versions of an XML file, and that is easiest if the formatting is consistent across versions.
I've written some thoughts about a general approach to XML formatting on the Scala Incubator Wiki, and I would appreciate it if you could have a look and add comments here if you have your own suggestions. I wouldn't be surprised if someone is already doing what I am proposing. If so, I would appreciate feedback on how well it works in practice.
My ultimate aim is to turn the proposal into code that can then be presented to the "scala-xml" mailing list, with the hope of getting it approved for inclusion in a future version of Scala.