Skip to main content

Home > blockly > Xml > workspaceToDom

Xml.workspaceToDom() function

Encode a block tree as XML.

Signature:

export declare function workspaceToDom(workspace: Workspace, skipId?: boolean): Element;

Parameters

ParameterTypeDescription
workspaceWorkspaceThe workspace containing blocks.
skipIdboolean(Optional) True if the encoder should skip the block IDs. False by default.

Returns:

Element

XML DOM element.