bbc/libxmljs

Name: libxmljs

Owner: BBC

Description: libxml bindings for v8 javascript engine

Created: 2015-04-17 14:31:44.0

Updated: 2016-09-26 10:52:03.0

Pushed: 2015-04-17 14:32:46.0

Homepage: https://github.com/polotek/libxmljs/wiki

Size: 4252

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Libxmljs

Build Status

LibXML bindings for node.js

libxmljs = require("libxmljs");
xml =  '<?xml version="1.0" encoding="UTF-8"?>' +
       '<root>' +
           '<child foo="bar">' +
               '<grandchild baz="fizbuzz">grandchild content</grandchild>' +
           '</child>' +
           '<sibling>with content!</sibling>' +
       '</root>';

xmlDoc = libxmljs.parseXml(xml);

path queries
gchild = xmlDoc.get('//grandchild');

ole.log(gchild.text());  // prints "grandchild content"

children = xmlDoc.root().childNodes();
child = children[0];

ole.log(child.attr('foo').value()); // prints "bar"
Support
API and Examples

Check out the wiki http://github.com/polotek/libxmljs/wiki.

See the examples folder.

Installation via npm
install libxmljs
Contribute

Start by checking out the open issues. Specifically the desired feature ones.

Requirements

Make sure you have met the requirements for node-gyp. You DO NOT need to manually install node-gyp; it comes bundled with node.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.