Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Using settings.xml to include graphml data elements into DATA

0 votes

When I import graphml (exported from Neo4j) into the desktop yED editor I can see 'name' and 'id' correctly populated in the DATA panel. Great!

Unfortunately, (as pointed out in other responses in the forum) due to the fact that the graphml specification is quite open to interpretation, other elements did not make it.

Where can I find instructions on how to map those data fields into yED? How can I use settings.xml to do this?

In my example below, I need to specify that labels ":Person" needs to be correctly mapped. thanks, great product, btw.

<node id="n166" labels=":Person"><data key="labels">:Person</data><data key="name">Jill</data><data key="id">111</data></node>
in Help by (160 points)

1 Answer

+1 vote
Best answer

Unfortunately, yEd cannot import data from attributes of <node> elements (i.e. <node id="n166" labels=":Person">).

It is, however, possible to import the information from the <data> elements in your example, i.e.
<node id="n166">
  <data key="labels">:Person</data>
  <data key="name">Jill</data>
  <data key="id">111</data>

For that to work, there need to be corresponding key definitions at the start of the GraphML file, i.e.
<graphml ...>
  <key attr.name="labels" attr.type="string" for="node" id="labels"/>
  <key attr.name="name" attr.type="string" for="node" id="name"/>
  <key attr.name="id" attr.type="string" for="node" id="id"/>
  <graph ...>
    <node ...>

      <data key="labels">:Person</data>
      <data key="name">Jill</data>
      <data key="id">111</data>


There is, however, no way to configure this in yEd. Your GraphML file needs to come with the appropriate key definitions. In other words, if Neo4j's GraphML export does not generate these key definitions, you need to add those yourself (e.g. using a text editor or in a post-processing step).

by [yWorks] (159k points)
selected by
Legal Disclosure | Privacy Policy