This Example describes a method to Normalize all of the Text in a DOM document. Methods which are used for Normalizing the text node in the DOM Document are described below :-
Element root = doc.getDocumentElement():-allows direct access to the root of the DOM document.
root.getNodeName():-gives the node name of the root.
root.normalize():-it normalize All of the Text in a Document
Xml code for the program generated is:-
Output of the program:-
|Normalize root is: Company|
Ask your questions, our development team will try to give answers to your questions.