Modules

filter

 

Objects/Functions

module (N/xml)

SuiteScript 2.0

Element.setAttributeNodeNS(options)

{Element}.setAttributeNodeNS({newAttr: {xml.Attr}})

N/xml Module
Element.setAttributeNodeNS()
Method Description: Adds the specified attribute node. If an attribute with the same local name and namespace URI is already present in the element, it is replaced by the new one. If an attribute with the same namespaceURI and localName property already exist, it is replaced with the object in the newAttr parameter. If the attribute node replaces an existing attribute node, the method returns the new xml.Attr object. This method is not supported on Internet Explorer.
Returns: xml.Attr
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=Element.setAttributeNodeNS(options)

Example:

// Code Example 1
//Add additional code
//...
elem[0].setAttributeNode({
newAttr : attr
});
//...
//Add additional code

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