DGML - Maple Help

DGML (.dgml) Graph Format

DGML file format

Description

 • DGML (Directed Graph Markup Language) is an XML-based file format for storing a directed graph, typically representing program dependencies. It was developed by Microsoft.
 • The GraphTheory[ImportGraph] and GraphTheory[ExportGraph] commands can read from and write to this format.
 • The general-purpose commands Import and Export also support this format.

Examples

Import data from a DGML file as a graph.

 > $G≔\mathrm{Import}\left("example/project.dgml",\mathrm{base}=\mathrm{datadir}\right)$
 ${G}{≔}{\mathrm{Graph 1: a directed unweighted graph with 4 vertices and 3 arc\left(s\right)}}$ (1)
 > $\mathrm{GraphTheory}:-\mathrm{DrawGraph}\left(G\right)$

Export the Heawood graph to a GraphML file in the home directory of the current user.

 > $\mathrm{HG}≔\mathrm{GraphTheory}:-\mathrm{SpecialGraphs}:-\mathrm{HeawoodGraph}\left(\right)$
 ${\mathrm{HG}}{≔}{\mathrm{Graph 2: an undirected unweighted graph with 14 vertices and 21 edge\left(s\right)}}$ (2)
 > $\mathrm{Export}\left("heawood.dgml",\mathrm{HG},\mathrm{base}=\mathrm{homedir}\right)$
 ${1414}$ (3)

References

 DGML Schema, microsoft.com