Modules

filter

 

Objects/Functions

module (N/xml)

SuiteScript 2.0

xml.escape(options)

{xml}.escape({xmlText: {string}})

N/xml Module
xml.escape()
Method Description: Prepares a string for use in XML by escaping XML markup, such as angle brackets, quotation marks, and ampersands.
Returns: string
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=xml.escape(options)

Example:

// Code Example 1
//Add additional code
//...
var xmlEscapedDocument = xml.escape({
xmlText : xmlFileContent
});
//...
//Add additional code

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