Modules

filter

 

Objects/Functions

module (N/xml)

SuiteScript 2.0

Document.createAttribute(options)

{Document}.createAttribute({name: {string},value: {string}})

N/xml Module
Document.createAttribute()
Method Description: Creates an attribute node of type ATTRIBUTE_NODE with the optional specified value and returns the new xml.Attr object. The localName, prefix, and namespaceURI properties of the new node are set to null.
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=Document.createAttribute(options)

Example:

// Code Example 1
//Add additional code
//...
var attr = xmlDocument.createAttribute({
name : 'lang',
value : 'fr'
});
//...
//Add additional code

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