New versions follow 3 steps : proposal, and official specification. The 1.3 version is the recommended version to work with. See history for previous versions. See the Primer to have a complete introduction on syntax, processing rules and extension mechanism.

The GEXF syntax is defined by a RelaxNG Compact Schema. XSD Schema is produced from this one for automatic validation (see below).

  • GEXF RelaxNG Compact definition
  • GEXF RelaxNG XML definition
  • GEXF XSD documentation
  • GEXF XSD files

XML Schema 1.3

XML Schema 1.2

XML Schema 1.1 (deprecated)


GEXF data files can be verified using the XSD Schema. All the XSD files are required to run a validation. For example, open mynetwork.gexf in oXygen XML Editor and press Validate document. That’s it, the software notifies now the errors and missing components! Another way is to download the XSD schema and use xmllint (command line XML tool) as follow:

$ xmllint --noout --schema gexf.xsd mynetwork.gexf

Note: remove the 'xsi:schemaLocation' element in your GEXF file before checking it with xmllint or libgexf. This workaround is necessary since XMLSchema has failed so specify how parsers may deal with it...

Please keep therefore in mind that XML validation is not perfect, especially:

  • Edge source and edge target references are not verified
  • Attribute values and types are not checked
  • Default attribute value and types are not checked
  • Dynamic value edge.start >= target.start
  • Dynamic value edge.end <= target.end

However a complete validation is processed by the libgexf toolkit on loading a file, so you should simply use it. If you need to implement your own parser or generator, a primer is available.