Skip to main content

Home > blockly > Xml > domToText

Xml.domToText() function

Converts a DOM structure into plain text. Currently the text format is fairly ugly: all one line with no whitespace, unless the DOM itself has whitespace built-in.

Signature:

export declare function domToText(dom: Node): string;

Parameters

ParameterTypeDescription
domNodeA tree of XML nodes.

Returns:

string

Text representation.