The XGMML format is an XML Format based on GML (Graph Modeling Format) features. Basically it is a XML representation of data within GML. Thus conversion between these two formats is easy. Gephi supports basic features: network topology and node attributes but no subgraphs nor edge attributes.

Warning: The XGMML Importer is not currently present in the 0.7+ version.

See the official documentation, specification, samples and schema on the following page.

XGMML Specification Official XGMML Specification

Attributes

Attributes support is slightly different from other formats. Instead of a global definition of attributes’s title, attributes are defined with directly values, within elements. In other words there is no attributes definition before graph is imported.

Supported attributes type:

  • integer
  • real
  • string

Default type is string.

Implementation details

* Because Gephi’s attributes system works with a fixed number of attributes, the file is pre-read once to collect different attributes name. Then, when elements are read, values are set if present or left at default value.
* The list attribute type is not supported.
* Avoid attributes with label as name.
* Nodes must have an id. Attributes must have name and value.

Basic sample


<?xml version="1.0"?>
<graph directed="1" id="42" label="Hello, I am a graph">
<node id="1" label="node 1">
</node>
<node id="2" label="node 2">
</node>
<node id="3" label="node 3">
</node>
<edge source="1" target="2" label="Edge from node 1 to node 2">
</edge>
<edge source="2" target="3" label="Edge from node 2 to node 3">
</edge>
<edge source="3" target="1" label="Edge from node 3 to node 1">
</edge>
</graph>

Advanced example

With 3 attributes.


<?xml version="1.0"?>
<graph directed="1" Rootnode="1">
<node id="52" label="http://www.cs.rpi.edu/~puninj/JAVA/tests/esum98.html" weight="8025">
<att name="title" value="Java Exam"/>
<att name="date" value="Tue Sep 29 14:55:04 1998"/>
<att name="code" value="200"/>
</node>
<node id="51" label="http://www.cs.rpi.edu/~puninj/JAVA/projects/proj1.html" weight="1910">
<att name="title" value="Project 1"/>
<att name="date" value="Wed Jun 9 23:01:06 1999"/>
<att name="code" value="200"/>
</node>
<node id="50" label="http://www.cs.rpi.edu/~puninj/JAVA/homeworks/hw2.html" weight="2795">
<att name="title" value="Homework 2"/>
<att name="date" value="Sun May 30 22:28:52 1999"/>
<att name="code" value="200"/>
</node>
<edge source="51" target="52">
</edge>
<edge source="50" target="52">
</edge>
<edge source="50" target="51">
</edge>
</graph>