Modules

filter

 

Objects/Functions

module (N/xml)

SuiteScript 2.0

Node.normalize()

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=Node.normalize() for more information.

N/xml Module
Node.normalize()
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: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/xml Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Node.normalize()

Example:

// Code Example 1
//Add additional code
//...
node.normalize();
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_457614685057.html