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
| Parameter | Type | Description |
|---|---|---|
| dom | Node | A tree of XML nodes. |
Returns:
string
Text representation.