I'm using JUNG to construct a Graph and then writing out to GraphML using a GraphMLWriter.
Using the addVertexData
and addEdgeData
methods I can get <data>
tags output to the XML.
e.g. I can get the following:
<edge id="123" source="456" target="789">
<data key="firstname">John</data>
</edge>
by adding a Transformer using addEdgeData
Is there a way for me to add XML attributes onto the edge node itself, e.g. to get the following?
<edge id="123" source="456" target="789" label="theDescriptionOfMyEdge">
<data key="firstname">John</data>
</edge>