A GraphML file consists of an XML file containing a graph element, within which is an unordered sequence of node and edge elements. Each node element should have a distinct id attribute, and each edge element has source and target attributes that identify the endpoints of an edge by having the same value as the id 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.
Brandes, Ulrik; Eiglsperger, Markus; Lerner, Jürgen; Pich, Christian. "Graph Markup Language (GraphML)". In Tamassia, Roberto (ed.). Handbook of Graph Drawing and Visualization (PDF). CRC Press. pp. 517–541.. /wiki/Ulrik_Brandes ↩