Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Failure of OGDF to open graphml file created by yEd

21 views
Skip to first unread message

Bill Ford

unread,
Oct 9, 2022, 1:07:02 AM10/9/22
to ogdf
My software must open graphml files, and anytime I create a graphml file with the application yEd (a frequently used graph drawing application), the OGDF routine that should open the file outputs "Syntax error". The link below is for the file "test.graphml" created by yEd. I would appreciate someone looking into this for me.

Thanks.

https://app.box.com/s/zlu05nb7lqcl6l40t1i6fc808er1a1bu

Dagobert Smart

unread,
Oct 10, 2022, 9:06:12 AM10/10/22
to ogdf
Dear Bill,

the file reading fails because the reader expects that every `key`-tag in a GraphML file contains a `attr.name` attribute (which is also part of the GraphML specification: http://graphml.graphdrawing.org/primer/graphml-primer.html#AttributesDefinition).

A simple fix is to delete all lines where a `key`-tag without `attr.name` is defined -- which are exactly those lines that contain the string `yfiles.type`.
An alternative approach is to use this patch (which I will include in the next OGDF release): https://gist.github.com/milsen/0d72c86e31f06b525530e8fe4d024ffc

Both approaches will cause a couple "Unknown {node,edge} attribute warning"s, but the reading should at least succeed (and the warnings are not even output with the default logger settings). Note, however, that the approaches above only allow the reading of a Graph and not of its attributes.
Reading in `GraphAttributes` as well would require larger additions to the GraphMLParser, and I currently do not have the time to work on that...

Best regards,
Dagobert
Reply all
Reply to author
Forward
0 new messages