/graphology-graphml

GRAPHML parser & writer for graphology.

Primary LanguageJavaScriptMIT LicenseMIT

Build Status

Graphology GRAPHML Utilities

GRAPHML parser & writer for graphology.

For more information about the GRAPHML file format, you can head there.

Installation

npm install graphology-graphml

Usage

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');

// Node
var graphml = require('graphology-graphml');
// Browser
var graphml = require('graphology-graphml/browser');

// Reading a string
var graph = graphml.parse(Graph, string);

// Reading a dom document
var graph = graphml.parse(Graph, xmlDocument);

Arguments

  • constructor GraphClass: graphology constructor to use.
  • source string|Document: source data to parse.