Questions tagged [libxml-js]

libxml bindings for v8 javascript engine.

libxml bindings for v8 javascript engine.

Download at https://github.com/polotek/libxmljs

47 questions
0
votes
0 answers

The sequence of data is not gets preserved when we use xml2js library to convert data from XML to a JavaScript object

I am trying to convert XML data to a javascript object and for this, I am using the below function let xmlFileData = convert.xml2js(xmlfile, { compact: true }); But the issue I am facing over here is the sequence of the converted data is not the…
0
votes
2 answers

Losing data field when converting XML string to JSON with xml-js or xml2js

I am trying to convert an xml string to json. All the data until now has been loading successfully, but then I discovered that sometimes when reading the data, the point did not exist. Using this xmlString:
0
votes
1 answer

SOAP text value to Objects

I am using the node package xml-js to convert a SOAP response to json. The text element response I got in two different requests are detailed below. How do I change the response in each cases? 1. Response { "declaration": { "attributes": { …
Adeola Oni
  • 55
  • 1
  • 9
0
votes
1 answer

Converting xml file data in js object

I need some help. I have an app that takes *.xml file through input type file, and converts it into js object. To do that i am using FileReader and xml-js library from here https://www.npmjs.com/package/xml-js Now I have two problems that I can't…
Stas Motorny
  • 141
  • 1
  • 8
0
votes
1 answer

read a xml file inside a zip file

This request return a Ziped File, with a XML file inside of it. myXMLText = '' request({ url: "http://webservice.newrastreamentoonline.com.br/", method: "POST", headers: { "content-type": "application/xml", // <--Very…
0
votes
0 answers

xml-js package converting xml string (not file) to js scrambles utf-8 charcaters

Using npm package xml-js I tried to convert some xml string with utf-8 characters in it. The method xml2js(..) is used. It scrmabled utf-8 characters like german umlaut chracters. Please take a look at the bellow example and consequent result: var…
edam
  • 910
  • 10
  • 29
0
votes
1 answer

How to get Missing Elelement error if Element doesnot have value in xml

I have tried to validate with xml against xsd using node module libxmljs(https://github.com/libxmljs/libxmljs/wiki#validating-against-xsd-schema) .So if element is mandatory in xsd but in xml element does not have any value ,it is empty then I…
Santosh Khavekar
  • 597
  • 1
  • 6
  • 22
0
votes
1 answer

npm install fails with node-gyp errors for libxmljs

I'm trying to run a node project that uses libxmljs, but it fails on installing it, with npm "ld: symbol(s) not found for architecture x86_64" I've tried different versions of npm, but none of helped, all have the same problem it appears. How can…
Brad Parks
  • 66,836
  • 64
  • 257
  • 336
0
votes
0 answers

libxmljs: how to use xinclude?

I try to use libxmljs with nodejs. In my sample I want to use the xi:include.
markus0074
  • 309
  • 1
  • 4
  • 14
0
votes
1 answer

NPM Install Fails on GYP MAKE: Error: `make` failed with exit code: 2

We recently took over a website and are now facing troubles updating the SASS. When running npm install a bunch of errors get thrown out. When rebuilding Gyp, something goes wrong and the process aborts. I've looked over a bunch of different posts…
Pieter Mathys
  • 19
  • 1
  • 5
0
votes
1 answer

Append html fragment as node value in libxmljs

I have a libxmljs document in which I would like to append html fragment. For example: var value = '

Soemthing

'; document.root().node('field', value); But I would like to preserve html…
pmp
  • 41
  • 3
  • 7
0
votes
2 answers

How to retrieve xpath from pom.xml with libxmljs

My issue has to do with namespaces. I am trying to retrieve the value of the element from a maven pom xml. My libxml-js code is as follows: var fs = require('fs'); var libxml = require('libxmljs'); fs.readFile('pom.xml', 'utf8', function…
0
votes
0 answers

xsd validate chose based on parent value

I have following xsd schema :-
Umesh Sehta
  • 10,555
  • 5
  • 39
  • 68
0
votes
1 answer

libxmljs: scons command not found

When I was trying to deploy my node.js app (with both nodejitsu and heroku), I got the same errors with libxmljs. > libxmljs@0.4.1 preinstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs > make node make:…
Michael Brew
  • 225
  • 1
  • 2
  • 9
0
votes
1 answer

nodejitsu deploy: scons command not found

I am trying to deploy my node app using nodejitsu, but receive an error when running 'jitsu deploy'. The relevant error lines are: > libxmljs@0.4.1 preinstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs > make…
Michael Brew
  • 225
  • 1
  • 2
  • 9