GraphML is an XML-based file format for graphs. The GraphML file format results from the joint effort of the graph drawing community to define a common format for exchanging graph structure data. It uses an XML-based syntax and supports the entire range of possible graph structure constellations including directed, undirected, mixed graphs, hypergraphs, and application-specific attributes.
A GraphML file consists of an XML file containing a <code>graph</code> element, within which is an unordered sequence of <code>node</code> and <code>edge</code> elements. Each <code>node</code> element should have a distinct <code>id</code> attribute, and each <code>edge</code> element has <code>source</code> and <code>target</code> attributes that identify the endpoints of an edge by having the same value as the <code>id</code> attributes of those endpoints. Here is what a simple undirected graph with two nodes and one edge between them looks like:
Additional features of the GraphML language allow its users to specify whether edges are directed or undirected, and to associate additional data with vertices or edges.