1 | var fs = require('fs');
|
2 |
|
3 | var cssax = require('../cssax');
|
4 |
|
5 | var stream = cssax.createStream();
|
6 | stream.query('td.title ~ td ~ td.title > a').on('match', function (tag, attributes) {
|
7 | this.readText(function (text) {
|
8 | console.log(JSON.stringify(text));
|
9 | });
|
10 | });
|
11 |
|
12 | fs.createReadStream(__dirname + '/hn.html').pipe(stream); |
\ | No newline at end of file |