Hello
Grateful for any help! I am doing something wrong here, trying to load some xml into a workspace, hoping that the blocks will appear in place in the UI:
const xml = `<xml>
<block type="start" id="1" deletable="false" x="30" y="30">
<next>
<block type="move_forwards" id="2">
<next>
<block type="move_forwards" id="3"></block>
</next>
</block>
</next>
</block>
</xml>`;
var p = new DOMParser();
var blocks = p.parseFromString(xml, "application/xml");
var workspace = Blockly.mainWorkspace;
var result = Blockly.Xml.domToWorkspace(blocks, workspace);
// and result is just [], and nothing changes in the UI
I'm on a learning curve with Blockly, so it might be something simple but thanks for any help