XML DOM normalize() Method
Definition and Usage
The normalize() method puts all Text nodes underneath a node (including attribute nodes) into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
The normal form is useful for operations that require a particular document tree structure and ensures that the XML DOM view of a document is identical when saved and reloaded.
The normalize() method is supported in all major browsers.
No return value.
|DOM Version||Core Level 2 Node Object. Modified in DOM Level 3|