Skip to content

Repository files navigation

Libxmljs

Build Status

LibXML bindings for node.js

varlibxmljs=require("libxmljs");varxml='<?xml version="1.0" encoding="UTF-8"?>'+'<root>'+'<child foo="bar">'+'<grandchild baz="fizbuzz">grandchild content</grandchild>'+'</child>'+'<sibling>with content!</sibling>'+'</root>';varxmlDoc=libxmljs.parseXml(xml);// xpath queriesvargchild=xmlDoc.get('//grandchild');console.log(gchild.text());// prints "grandchild content"varchildren=xmlDoc.root().childNodes();varchild=children[0];console.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

npm install libxmljs

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.

About

libxml bindings for v8 javascript engine

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors