Tag: libxml js

我parsingXML文件使用libxmljs和.get()总是返回第一个孩子

我一直在看这个代码几个小时,我不能让它工作,我不知道为什么。 var libxmljs = require("libxmljs"); var xml = '<?xml version="1.0" encoding="UTF-8"?>' + '<root>' + '<child foo="bar">' + '<grandchild>First Child</grandchild>' + '</child>' + '<child foo="bar">' + '<grandchild>Second child</grandchild>' + '</child>' + '<child foo="bar">' + '<grandchild>Third Child</grandchild>' + '</child>' + '<sibling>with content!</sibling>' + '</root>'; var xmlDoc = libxmljs.parseXml(xml); var childs = xmlDoc.find('//child'); for (var i = 0; […]

尝试安装npm软件包'libxmljs'时出错

当我尝试安装libxmljs npm软件包时,出现以下错误信息。 $ sudo npm install -g libxmljs npm http GET https://registry.npmjs.org/libxmljs npm http 200 https://registry.npmjs.org/libxmljs npm http GET https://registry.npmjs.org/bindings/1.0.0 npm http 200 https://registry.npmjs.org/bindings/1.0.0 npm http GET https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz > libxmljs@0.8.1 install /usr/lib/node_modules/libxmljs > node-gyp rebuild gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/support/.node-gyp/0.10.23" gyp […]

在Windows Azure上部署节点/快速应用程序时出错

我目前正在试图在Azure上部署一个Express / Node.js应用程序而没有太多的成功 – 我得到的错误是: remote: > libxmljs@0.9.0 install D:\home\site\wwwroot\node_modules\libxmljs remote: > node-gyp rebuild remote: remote: remote: D:\home\site\wwwroot\node_modules\libxmljs>node "D:\Program Files (x86)\npm\1.3.11\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild remote: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". […]

libxmljs“找不到绑定文件”错误(Windows)

我正在使用一个名为gulp -xml-editor的模块,它使用libxmljs 。 所有在我们的Mac上运行良好,但是当我尝试在我们的Windows机器上,我得到: “找不到绑定文件”引用libxmljs的绑定依赖项: C:\HiddenPath\App Source>gulp clean C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\node_modules\bindings\bindings.js:91 throw err ^ Error: Could not locate the bindings file. Tried: ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\Debug\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\Release\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\out\Debug\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\Debug\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\out\Release\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\Release\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\build\default\xmljs.node ÔåÆ C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\compiled\0.12.7\win32\ia32\xmljs.node at bindings (C:\HiddenPath\App Source\node_modules\gulp-xml-editor\node_modules\libxmljs\node_modules\bindings\bindings.js:88 :9) at Object.<anonymous> […]

我们可以复制和粘贴节点模块吗?

通常我们不使用“npm”来安装节点模块。 但是,我们的项目中的一个节点模块是libxmljs这个模块有两个问题 1>版本(v 0.17.1)不能安装在windows机器上。 Issue392 2>它需要VS 2013或15来build立问题393 首先我们通过将版本从0.17.1降低到0.16.1来解决。 现在对于第二个问题,我的开发机器安装了VS 2013。 所以我能够在我的开发机器上安装libxmljs。 但是,在Web服务器上,我们不想安装VS。 我想知道它会工作,如果只是复制“node_modules \ libxmljs”文件夹从开发机器到Web服务器?

node.js – “libxmljs”模块错误

node -v v4.4.7 npm -v v2.15.8 node-gyp -v v3.4.0 我试图运行我的节点应用程序,它使用libxmljs模块,我得到这个奇怪的错误: libxmljs/node_modules/bindings/bindings.js:83 throw e ^ Error: /link/node_modules/libxmljs/build/Release/xmljs.node: undefined symbol: _ZN2v82V837AdjustAmountOfExternalAllocatedMemoryEl at Error (native) at Object.Module._extensions..node (module.js:434:18) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at bindings (/link/node_modules/libxmljs/node_modules/bindings/bindings.js:76:44) at Object.<anonymous> (/link/node_modules/libxmljs/lib/bindings.js:1:99) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) 我试图npm update并再次安装libxmljs 。 不起作用。 有小费吗?