JGraphT has a GraphMLExporter that enables to export a graph to a GraphML file. There doesn't seem to be a GraphMLImporter.
Is there a simple way to generate a graph in JGraphT from a .grphml file?
Starting from version 1.0.0 JGraphT has both an importer and an exporter for GraphML. The classes are named GraphMLImporter
and GraphMLExporter
inside the jgrapht-ext package.
Starting from version 1.1 all importers and exporters are located in the jgrapht-io package. Additionally, a simpler version called SimpleGraphMLImporter
which provides less functionality in favor of greater speed is also available in latest versions.
A demo is also available, see GraphMLDemo.
Check out jgrapht-sna project. Beside implementations of SNA algorithms, it has
GraphMLImporter
class.