XML FORMAT

GraphML 1.1

GraphML

GraphML 1.1 is the yWorks (yFiles) extension of the standard GraphML interchange format, identified by the schema namespace http://www.yworks.com/xml/schema/graphml/1.1 and the yFiles data namespace http://www.yworks.com/xml/graphml. It is not a new version of the core GraphML language published by the graph-drawing community — that base language is essentially frozen at its 2007 release (see GraphML and GraphML 1.0). Instead, "1.1" layers rich diagramming and layout information on top of ordinary GraphML documents, and is the native on-disk format written and read by yWorks' yEd graph editor and the yFiles libraries.

Structurally, a GraphML 1.1 file is still a valid GraphML document: a <graphml> root containing a <graph> with edgedefault, plus <node>, <edge>, <key> and <data> elements. The yFiles extension works entirely through the standard attribute-declaration mechanism, adding <key> elements marked with a yfiles.type attribute (for example yfiles.type="nodegraphics" or "edgegraphics"). The associated <data> payloads then carry yFiles-specific graphics elements in the y: namespace — <y:ShapeNode>, <y:PolyLineEdge>, <y:NodeLabel>, and geometry and styling children such as <y:Geometry> (x, y, width, height), <y:Fill>, <y:BorderStyle>, <y:LineStyle> and <y:Arrows>. Two schemas define these: ygraphml.xsd for the extra data elements and ygraphics.xsd for the realizer/graphics types.

The practical significance of GraphML 1.1 is that it captures a laid-out, styled diagram rather than only an abstract graph. Node positions, sizes, colors, edge routing (poly-line and orthogonal paths, arrowheads) and labels are all preserved, which is why yEd files round-trip visually. It retains the general strengths of GraphML — human-readable, XML-schema-validatable, extensible, and able to attach typed attributes to nodes and edges — while adding a concrete visual model.

Its main limitation is portability: the y: graphics elements are yFiles-specific, so tools that consume plain GraphML (for example NetworkX, Gephi, or Cytoscape) typically parse the structural graph and attributes but discard or misread the yFiles visualization payload. Converters such as GraphInOut and general graph-format tools can bridge GraphML 1.1 to plainer graph representations, but the styling seldom survives a lossless round trip outside the yWorks ecosystem.

Alternative Names: Graph Markup Language

File Extensions: .graphml v1.1
FeatureGraphML
Multiple Graphs per Document supported
Nodes supported
Undirected Edges supported
Directed Edges supported
Hyperedges supported
Mixed-directionality Edges supported
Parallel Edges supported
Self-loops supported
Edges on Edges not supported
Nested Graphs in Nodes supported
Nested Graphs in Edges supported
Nested Graphs in Graphs supported
Node Labels partial
Edge Labels partial
Attributes on Nodes supported
Attributes on Edges supported
Attributes on Graphs supported
Typed Edges partial

See also

Frequently Asked Questions

What is a GraphML file?

A GraphML file stores a graph — its nodes, edges and attributes — in the GraphML format (also: Graph Markup Language). See the feature table above for what it supports.

How do I open a GraphML file?

Open it in a graph tool that supports GraphML, or convert it to a format your tool reads. With GraphInOut you can convert GraphML to GraphML, DOT, Connected JSON and more, right in your browser.

How do I convert a GraphML file to another format?

Use the Convert from GraphML link above: upload or paste your GraphML file (input preset to GraphML), choose a target format and download the result — free, no install.