graphology-graphml
TypeScript icon, indicating that this package has built-in type declarations

0.5.2 • Public • Published

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

// Passing options
var graph = graphml.parse(Graph, string, {addMissingNodes: true});

Arguments

  • constructor GraphClass: graphology constructor to use.
  • source string|Document: source data to parse.
  • options ?object: parsing options:
    • addMissingNodes ?boolean [false]: whether to add missing nodes referenced in the file's edges.

Package Sidebar

Install

npm i graphology-graphml

Weekly Downloads

114

Version

0.5.2

License

MIT

Unpacked Size

12.5 kB

Total Files

13

Last publish

Collaborators

  • yomguithereal