Possible duplicate:
What does the normal Java Node method do?
What is xml normalization. I found the following in javadoc, but I can not understand it? Can anyone help?
public void normalize()
Puts all text nodes to the entire depth of the subtree under this Node, including attribute nodes, in a "normal" form, where only the structure (for example, elements, comments, processing instructions, CDATA sections and link essence) separates the text nodes, i.e. there are no adjacent text nodes or empty text nodes. This can be used to ensure that the DOM representation of the document is the same as if it were saved and reloaded, and is useful when operations (for example, searching XPointer [XPointer]) that depend on the particular structure of the document tree are used. If the "normalize-characters" parameter of the DOMConfiguration object attached to Node.ownerDocument is true, this method also completely normalizes the characters of the Text nodes. Note. In cases where the document contains CDATASections, the normalization operation alone may not be sufficient, because XPointers do not distinguish between Text nodes and CDATASection nodes. Because: DOM Level 3
source share