Render and interact with XML in the browser
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example make folding look better Oct 2, 2015
.gitignore parse xml Oct 2, 2015
Makefile
README.md
index.js
package.json chore(package): update dependencies Nov 28, 2016

README.md

xml-viewer

Render and interact with XML in the browser

Example

view on requirebin

var Viewer = require('xml-viewer');
var fs = require('fs');
var xml = fs.readFileSync(__dirname + '/data.xml');
var insertCSS = require('insert-css');

var view = new Viewer(xml);
view.appendTo(document.body);

view.on('select', function(node){
  if (!node) return console.log('nothing selected');
  console.log('selected:');
  console.log(node);
  console.log(node.text());
});

insertCSS('.selected { background-color: #FFFF91 }');

Installation

$ npm install xml-viewer

License

MIT