Graphology GEXF Utilities
GEXF parser & writer for graphology
.
For more information about the GEXF file format, you can head there.
Installation
npm install graphology-gexf
Usage
Browser parser
The parser must be passed a graphology
constructor and is able to read either a string, or an XMLDocument
instance.
var Graph = require('graphology');
var gexf = require('graphology-gexf/browser');
var graph = gexf.parse(Graph, string);
var graph = gexf.parse(Graph, xmlDocument);
Arguments
- constructor GraphClass: graphology constructor to use.
- source string|Document: source data to parse.
Browser writer
The writer must be passed a graphology
instance and will output a GEXF string.
var gexf = require('graphology-gexf/browser');
var gexfString = gexf.write(graph);
Arguments
- graph Graph: graphology instance to write.