small medium large xlarge

Generic-user-small
28 Aug 2017, 15:15
Tung Nguyen (1 post)

I’ve try your code, but it cannot parse list, it can only get single field. node --harmony -e \ 'require("./lib/rdf-parser.js")("cache/epub/111/pg111.rdf", console.log)'

Here is console log: ~~~ null { _id: ‘111’, title: ‘Freckles’, authors: initialize { ‘0’: ‘Stratton-Porter, Gene’, options: { xmlMode: true, withDomLvl1: true, normalizeWhitespace: false, xml: false, decodeEntities: true }, _root: initialize { ‘0’: [Object], options: [Object], length: 1, _root: [Circular] }, length: 1, prevObject: initialize { ‘0’: [Object], options: [Object], _root: [Object], length: 1, prevObject: [Object] } }, subjects: initialize { ‘0’: ‘Swamps – Fiction’, ‘1’: ‘Indiana – Fiction’, options: { xmlMode: true, withDomLvl1: true, normalizeWhitespace: false, xml: false, decodeEntities: true }, _root: initialize { ‘0’: [Object], options: [Object], length: 1, _root: [Circular] }, length: 2, prevObject: initialize { ‘0’: [Object], ‘1’: [Object], options: [Object], _root: [Object], length: 2, prevObject: [Object] } } } ~~~ Sorry for my bad English.

Avatar_pragsmall
28 Aug 2017, 20:24
Jim R. Wilson (102 posts)

Hi Tung,

The problem is probably the version of the cheerio library. One of the biggest mistakes I made in the book was not listing specific version numbers. This other thread has details: forums.pragprog.com/forums/301/topics/12439

I’d recommend trying out my new book Node.js 8 the Right Way. I’ve been very careful about version numbers in this edition. Hope this helps!

– Jim R. Wilson

You must be logged in to comment