opened
PaulSchweizer
username_0
Serialize to and from graphml
issue
created
PaulSchweizer
username_0
@username_1 , good idea! Yes, adding these two methods to the graph would be really good.
It could look something like this maybe (just a quick idea):
```xml
<graph id="{graph.name}" edgedefault="directed">
    <node id="{node1.identifier}"/>
    <node id="{node2.identifier>"/>
    <edge id="{node1.outputs[output_name].name}-{node2.inputs[input_name].name}" source="{node1.identifier}" target="{node2.identifier}"/>
  </graph>
```
Not sure where to put the other attributes of the Node like "metadata", "class", "module" etc. but you'll find a way :D 
Thanks again!
comment
created
Anton-4
username_1
I started working on this and thought: do we really need full serialization and deserialization or just exporting of graph, nodes and edges without attributes like metadata, class, module... ?

I mainly wanted to export to graphml to have a standardized format to feed into the visualizer.
What was your intended use-case for full serialization and deserialization?
comment
created
PaulSchweizer
username_0
I see your point @username_1 but if we would fully serialize the graph like we currently do in json, we could use the graphml file to fully reconstruct the graph afterwards. Otherwise we would need to keep another (json) file for that purpose. 
If it is too much work though, we can start by only serializing as much as you need for visualizing the graph, it should be possible to extend the graphml serialization later.
comment
created
Anton-4
username_1
I now found how I can cleanly add in nested xml. That issues was kind of holding me back.
I will make it work :)
comment
created
PaulSchweizer
username_0
Amazing! Thanks @username_1
comment
created
PaulSchweizer
username_0
@username_1 I'm planning to put some time into flowpipe over the next weeks and am browsing through the backlog here, trying to get back into it and do some planning. Let me know if you're still working on this
comment
created
Anton-4
username_1
I have not continued working in this. This did require some work to define the complex types as explained [here](http://graphml.graphdrawing.org/primer/graphml-primer.html#Complex).
Feel free to continue working on the schema definition I started [here](https://github.com/username_1/flowpipe/commit/a574b1eecf552e2a21b80e45063890e1df206b52).
comment
created
PaulSchweizer
username_0
Perfect! Thanks for the links and the work you put into this already! I'm going to put some time into this after the compound plugs are done
comment