Like some other packages, Sun's supports this. (In fact, I've been
a bit surprised how many people call this out as a favorite feature.
Even more than like its speed!)
http://java.sun.com/jdc/earlyAccess/xml
Our model has thus far been that a complete XML package must support
a basic "round trip" of data -- though excluding the DTD info. So
it's easy to just use XmlDocument.write (writer) to emit XML text.
Yes, this transparently handles stuff like "&" and "<" in text.
- Dave