Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Sizzle powered CSS selectors for libxmljs
JavaScript
tree: fa511240ad

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
LICENSE
Makefile
README.md
package.json
test.js

README.md

nQuery

A node.js plugin that brings sizzle and libxmljs together. Currently it passes all relevant sizzle tests when used with an HTML document.

Requirements

  • Node v0.1.102+
  • libxmljs v0.4.0+

How to install

npm install nquery

How to test

To run the tests, go to the project's root directory and run

make test

Demo

To run the demo, go to the examples directory and run

node web.js

How to use

var nquery = require('nquery');
var html   = '<html><head></head><body><div id="test" class="test">google</div></body></html>';
var $      = nquery.createHtmlDocument(html);
var $divs  = $('div.test');

for (var i = 0; i < $divs.length; i++) {
    console.log($divs[i].toString());
}
Something went wrong with that request. Please try again.