Modules

filter

 

Objects/Functions

module (N/xml)

SuiteScript 2.0

Document.adoptNode(options)

{Document}.adoptNode({source: {xml.Node}})

N/xml Module
Document.adoptNode()
Method Description: Attempts to adopt a node from another document to this document. If successful, this method changes the Node.ownerDocument property of the source node, its children, and any attribute nodes to the current document. If the source node has a parent node, the parent node is first removed from the child list of its own parent node. This method is not supported on Internet Explorer.
Returns: xml.Node
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=Document.adoptNode(options)

Example:

// Code Example 1
//Add additional code
//...
var adoptedNode = xmlDocument1.adoptNode({
source : sourceNode,
});
//...
//Add additional code

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