Stay organized with collections
Save and categorize content based on your preferences.
blockly > Xml > variablesToDom
Xml.variablesToDom() function
Encode a list of variables as XML.
Signature:
export declare function variablesToDom(variableList: IVariableModel<IVariableState>[]): Element;
Parameters
Returns:
Element
Tree of XML elements.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003evariablesToDom\u003c/code\u003e function within the Blockly Xml namespace converts a list of variable models into an XML tree.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a single argument: an array of \u003ccode\u003eVariableModel\u003c/code\u003e objects representing the variables to be encoded.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns an \u003ccode\u003eElement\u003c/code\u003e which represents the root of the generated XML tree containing the encoded variables.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [Xml](./blockly.xml_namespace.md) \\\u003e [variablesToDom](./blockly.xml_namespace.variablestodom_1_function.md)\n\nXml.variablesToDom() function\n-----------------------------\n\nEncode a list of variables as XML.\n\n**Signature:** \n\n export declare function variablesToDom(variableList: IVariableModel\u003cIVariableState\u003e[]): Element;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|--------------|------------------------------------------------------------------------------------------------------------------------|------------------------------|\n| variableList | [IVariableModel](./blockly.ivariablemodel_interface.md)\\\u003c[IVariableState](./blockly.ivariablestate_interface.md)\\\u003e\\[\\] | List of all variable models. |\n\n**Returns:**\n\nElement\n\nTree of XML elements."]]