Package Exports
- libxmljs
- libxmljs/index.js
- libxmljs/lib/element
- libxmljs/lib/element.js
- libxmljs/lib/text
- libxmljs/lib/text.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (libxmljs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Libxmljs
LibXML bindings for node.js
var libxmljs = require("libxmljs");
var xml = '<?xml version="1.0" encoding="UTF-8"?>' +
'<root>' +
'<child foo="bar">' +
'<grandchild baz="fizbuzz">grandchild content</grandchild>' +
'</child>' +
'<sibling>with content!</sibling>' +
'</root>';
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/libxmljs/libxmljs/wiki
- Mailing list - http://groups.google.com/group/libxmljs
API and Examples
Check out the wiki http://github.com/libxmljs/libxmljs/wiki.
See the examples folder.
Installation via npm
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.