Stay organized with collections Save and categorize content based on your preferences.

blockly > Xml > textToDom

Xml.textToDom() function

Converts an XML string into a DOM structure.

Signature:

export declare function textToDom(text: string): Element;

Parameters

Parameter Type Description
text string An XML string.

Returns:

Element

A DOM object representing the singular child of the document element.

Exceptions

if the text doesn't parse.