libxml-js

Error building libxmljs for node.js

二次信任 提交于 2020-01-05 03:04:06
问题 I'm having a problems building libxmljs on my mac os x 10.9.3. Here's what I'm getting: 3 warnings generated. CC(target) Release/obj.target/libxml/vendor/libxml/xpointer.o LIBTOOL-STATIC Release/xml.a libtool: unrecognized option `-static' libtool: Try `libtool --help' for more information. make: *** [Release/xml.a] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib

Error building libxmljs for node.js

跟風遠走 提交于 2020-01-05 03:04:06
问题 I'm having a problems building libxmljs on my mac os x 10.9.3. Here's what I'm getting: 3 warnings generated. CC(target) Release/obj.target/libxml/vendor/libxml/xpointer.o LIBTOOL-STATIC Release/xml.a libtool: unrecognized option `-static' libtool: Try `libtool --help' for more information. make: *** [Release/xml.a] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib

Error: Cannot find module 'libxmljs'

拜拜、爱过 提交于 2019-12-11 08:15:55
问题 I am trying to parse xml using phantomjs for the following file, documentpreviewer1.js var webPage = require('webpage'); var page = webPage.create(); var url = "http://xxx/sitemap.xml"; page.open(url, function(status){ if(status != 'success'){ console.log('Unable to access cfc'); } else { var xml = page.content; var libxmljs = require("libxmljs"); var xmlDoc = libxmljs.parseXml(xml); var url1 = xmlDoc.get('//urlset/url[0]/loc'); console.log(url1); } }); when I run the above code, I get the