libxml bindings for v8 javascript engine
npm install libxmljs3javascript
var libxmljs = require('libxmljs2');
var xml =
'' +
'' +
'' +
'grandchild content ' +
' ' +
'with content! ' +
' ';
var xmlDoc = libxmljs.parseXml(xml);
// xpath queries
var gchild = xmlDoc.get('//grandchild');
console.log(gchild.text()); // prints "grandchild content"
var children = xmlDoc.root().childNodes();
var child = children[0];
console.log(child.attr('foo').value()); // prints "bar"
`
Support
- Docs - http://github.com/marudor/libxmljs2/wiki
API and Examples
Check out the wiki http://github.com/marudor/libxmljs2/wiki.
See the examples folder.
Installation via npm
`shell
npm install libxmljs2
``