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:
You will have to write some code to generate your flow.json of course. Or if you structure your xml you may be able to pass it through the xml node, then a json node to generate a JSON. You could set up a http endpoint flow to possibly do this for you.