using Crimson Using the Sun's Crimson you can cast the w3c document to type of XmlDocument and then use the write method.
This method works except for a small shortcoming - every save creates a carriage return character behind every closing tag. As I open modify and then save the same file these characters are adding up quickly.
Using Transformer Package that is included with JAXP1.1
This method works great except for one major flaw. If your document had a DOCTYPE, when you load your document, add some nodes etc.. and then save, you will notice the DOCTYPE declaration missing!!. HTH ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).