Class: DOMUtil

DOMUtil()

Generic DOM utilities.

Constructor

new DOMUtil()

Source:

Methods

(static) escapeXML(text, maxCodeopt) → {string}

Escapes specified string (that is, '<' is replaced by "&#60;", '&' is replaced by "&#38;", etc).
Parameters:
Name Type Attributes Default Description
text string string to be escaped.
maxCode number <optional>
0xFFFF maxCode - characters with code > maxCode are escaped as &#code;. Pass 127 for US-ASCII, 255 for ISO-8859-1, otherwise pass 0xFFFF (Unicode Basic Multilingual Plane).
Source:
Returns:
escaped string.
Type
string

(static) unescapeXML(text) → {string}

Unescapes specified string. Inverse operation of escapeXML.
Parameters:
Name Type Description
text string string to be unescaped.
Source:
Returns:
unescaped string.
Type
string