Reading and Writing Graph Structure Data

By default, the yFiles library already offers various possibilities for writing a graph to different file formats. Table 9.2, “Supported file formats” lists the supported graph exchange file formats. The recommended file format, GraphML, is listed topmost. It offers the best mixture of robustness, compatibility, and flexibility.

Table 9.2. Supported file formats

File Name Extension Format Name Description
graphml GraphML XML-based file format. Not to be confused with GML, its aged ancestor.
ygf Y Graph Format Proprietary binary file format.
gml Graph Modeling Language Text-based file format. The ancestor of modern, XML-based GraphML.
xgml Graph Modeling Language Text-based file format. XML-ish variant of GML.
tgf Trivial Graph Format Text-based file format. Saves only a graph's structure and existing labels.