polotek/libxmljs — pull request #271 by hildjj (2014-11-03 19:24:56+00:00)
Title: Add .nsDecls API

Fixes #270. New API:

```javascript
var str = '

';
var doc = libxml.parseXmlString(str);
var root = doc.root();
var decls = root.nsDecls()
```

`decls` now includes two namespace objects. Applying to the body element yields an empty array.

Tests included. I'll add docs to the wiki if you take the patch. I'm open to renaming the API anything you like.