XML DOM normalize() Method


❮ Node Object

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.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The normalize() method is supported in all major browsers.


Syntax

nodeObject.normalize()

Parameters

None.

Return Value

No return value.

Technical Details

DOM Version Core Level 2 Node Object. Modified in DOM Level 3

❮ Node Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.