Table of Contents

Method Normalize

Namespace
SharpVectors.Dom
Assembly
SharpVectors.Core.dll

Normalize()

Puts all IText nodes in the full depth of the sub-tree underneath this INode, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates IText nodes, i.e., there are neither adjacent IText nodes nor empty IText nodes.

void Normalize()

Remarks

This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.

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