normalize( )

Normalizes an ADOMNode object. This is a DOM level 2 feature.

Interface

ADOMNode (W3C DOM: Node)

IDL definition
void normalize( );
JavaScript synopsis
nodeobj.normalize( )
C synopsis
void ADOMnormalize(ADOMNode* nodeobj);
Parameters
  • nodeobj   The ADOMNode object.

Returns

Normalized ADOMNode object.

Remarks

From the description in the W3C spec ([external link] http://www.w3.org/TR/DOM-Level-2-Core/core.html):

Puts all Text nodes in the full depth of the subtree underneath this Node, including attribute nodes, into a "normal" form where only structure (for example, elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes—that is, there are neither adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and reloaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.

Note

In cases where the document contains CDATASections, the normalize operation alone may not be sufficient, since XPointers do not differentiate between Text nodes and CDATASection nodes.