vsvg-parser
v0.3.1
Published
A minimal implementation of a svg parser used in vsvg
Downloads
1,246
Readme
vsvg-parser ( virtual SVG parser )
vsvg-parser is a small lib that allow you to parser svg's server side or client side. Its still in early devlopment so expect bug and file issues. Primarly used in vsvg.
Install
$ npm install vsvg-parser
You can also use it with your Browserify bundles.
Usage
var parser = require( 'vsvg-parser' );
console.log( parser.parse( '<svg><line /></svg>' ) );
/*
[ { tagName: 'svg',
attributes: {},
children:
[ { tagName: 'line',
attributes: {},
children: [],
text: null,
inside: 0,
closed: true,
position: [ 0, 0 ] } ],
text: null,
inside: -1,
closed: true,
position: [ 0 ] } ]
*/