Node.normalize()

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Puts all text nodes underneath a node, including attribute nodes, into a normal form. In normal form, only structure (such as elements, comments, processing instructions, CDATA sections, and entity references) separates text nodes. After normalization, there are no adjacent or empty text nodes.

Use this method if you require a particular document tree structure and want to make sure that the XML DOM view of a document is identical when you save and reload it.

Returns

void

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/xml Module

Since

2015.2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/xml Module Script Samples.

          //Add additional code 
...
node.normalize();
...
//Add additional code 

        

Related Topics

xml.Node
N/xml Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices