Java DOM edit: Normalize All of the Text in a Document
public void normalize(Document doc) { Element root = doc.getDocumentElement(); root.normalize(); }