posted 17 years ago
If I use node.removeChild(Node) to modify XML and then write it to disk using javax.xml.transform.Transformer, I end up with blank lines where the nodes were deleted. Is there any way to keep the blank lines from bring printed?
For example, the XML may look like this:
If I use the apache classes XMLSerializer and OutputFormat, the blank lines aren't printed. But I'd like to find a way to use the JDK classes (javax.xml.transform.Transformer, etc.)
I'm writing the XML as follows:
Thanks.