Share via


normalize Method (Compact 2013)

3/26/2014

Normalizes all descendant elements by combining two or more adjacent text nodes into one unified text node.

Syntax

oXMLDOMElement.normalize();
HRESULT normalize(void);

Parameters

Script

None.

C/C++

None.

Return Value

Script

None.

C/C++

  • S_OK
    Value returned if successful.
  • E_FAIL
    Value returned if an error occurs.

Remarks

This method converts all text node descendants of this element (at any depth) into a normal form where no text nodes are adjacent. In normal form, text nodes can be separated only by markup, such as tags, comments, processing instructions, CDATA sections, and entity references. The normal form is useful for operations that require a particular document tree structure and ensures that the XML Document Object Model (DOM) view of a document is identical when saved and reloaded.

Collapsed node objects are automatically deleted.

This method applies to the following objects and interfaces:

IXMLDOMText, and IXMLDOMElement.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML DOM Methods