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.

Categories

What are the bare minimum requirements for an externally produced .graphml file?

+3 votes

I want to write a program to produce a graphml file that I can work on with yEd but the only online documentation on the graphml schema I can find is very general and of course doesn't address the custom yEd namespace. I have a few questions before I begin coding:

  1. What are the bare minimum requirements for an externally produced .graphml file that will be accepted by yEd? Is there a generalized template that I can use when designing my program's output?
  2. Is there a reference document on the yEd graphml namespace that describes it in simple terms? (I'm just a hobby programmer and haven't written a major project in a long time so the simpler the better. wink)
  3. More specifically, I need information about a) Nodes (defining shapes and colors) and b) Edges (available line types and arrowheads).
  4. Can an external stylesheet be used to predefine default properties?

I've seen the output of another program so I can guess a lot of it, but I really don't want to if I don't have to.

in Help by (150 points)

1 Answer

0 votes
  1. yEd will accept any "valid' GraphML - "valid" meaning a GraphML file that adheres to the GraphML specification available from graphml.graphdrawing.org. However, that document only specifies how to encode structure. Geometry (positions, sizes), label texts, and style information has to be provided in a yEd-specific way (otherwise it will be ignored or imported as custom properties).
    There is no generalized template. You will have to look into yEd produced GraphML files to learn how yEd expects these pieces of information.
  2. No, there is no reference document for the yEd-specific GraphML format.
  3. See 1. above - create a simple diagram (e.g. one node only), save as GraphML, and look into the file using a text editor or an XML editor.
  4. No, this is not possible.

The only alternative to "reverse engineering" the yEd-specific GraphML format is using the yFiles diagramming library for writing GraphML. yEd is based on yFiles for Java 2.x and uses yFiles' GraphML framework.

by [yWorks] (161k points)
Legal Disclosure | Privacy Policy
...