I have a Java web application with tree data structures in XML, by pressing a button I want it to open the Node-RED editor page and have it display a flow containing function nodes with the same "structure" of the chosen tree and predetermined JavaScript code inside. To give and example, if I have select a tree with just a root node and 2 children and press the "export to Node-RED" button I would like the result to be the following:
Is there an API that can help me with this ? Is there a way to generate the JSON flow before opening up the editor ?
