This document specifies syntax and processing rules for the GraphML language core (structural layer) and two GraphML extensions that allow to add base-type attributes and parsing information. While a more comprehensive introduction can be found here, some background on the design of GraphML is provided in the following reference:
U. Brandes, M. Eiglsperger, I. Herman, M. Himsolt,
and M.S. Marshall:
The GraphML syntax is defined by the GraphML Schema. While this is the binding definition, we also provide a looser specfication in the GraphML Document Type Definition (DTD), which, e.g., does not distinguish reference types like node and edge IDs. Nevertheless, some applications may need a DTD to work properly.GraphML Schema single HTML old multi HTML
Elements an application can't handle are ignored, i.e. a GraphML document is interpreted as if consisting only of those elements known and visible to the application. In particular:
GraphML provide a mechanism to add data to the structural elements (e.g. <graph>s, <node>s, <edge>s, etc.). Data labellings are considered to be (possibly partial) functions that assign values in an (a priori) arbitrary range to elements of the graph. Such a function is declared by a <key> element. The domain of definition of this function is specified by the 'for' attribute of the <key>. Values are defined by a <default> element (child of <key>) and/or <data> elements (children of the elements, which are in the domain of definition) whose 'key' attribute-values matches the 'id' of the <key>.
The attribute extension allows specification of the range of values of the abovementioned data functions. It does so by the additional attribute 'attr.type' of <key>. Values of this attribute ('boolean', 'int', 'long', 'float', 'double', and 'string') specify how to interpret the charakter strings within <data> and <default> elements.
Furthermore an attribute 'attr.name' is added to <key> which may be used by applications to identify their data.
Information for Parsers
The parseinfo extension adds several attributes to <graph>s and <node>s which help parsers to process a document more efficiently. These attributes specify for instance the number of <node>s or <edge>s, degrees of nodes, maximal/minimal degree and more.
GraphML can be extended in two ways:
How this can be done will be explained in a more comprehensive introduction which is being prepared.
Last update: Monday, 18-Feb-2019 15:45:03 CET