Modules

filter

 

Objects/Functions

module (N/xml)

SuiteScript 2.0

Element.setAttributeNS(options)

{Element}.setAttributeNS({namespaceURI: {string},qualifiedName: {string},value: {string}})

N/xml Module
Element.setAttributeNS()
Method Description: Adds a new attribute with the specified name and namespace URI. If an attribute with the same name and namespace URI is already present in the element, its value is changed to the value specified in method argument. If an attribute with the specified name already exists, the value of the attribute is changed to the value of the value 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: 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=Element.setAttributeNS(options)

Example:

// Code Example 1
//Add additional code
//...
elem[0].setAttributeNS({
namespaceURI : '*',
qualifiedName : 'lang',
value : 'fr'
});
//...
//Add additional code

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