Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Giriraj Sharma
    hey, I have an xml body like this http://pastebin.com/LnY9pSCR
    I am trying to parse it via following options
    XML2JSON_OPTS       = {
        object          : true,
        reversible      : false,
        coerce          : false,
        sanitize        : true,
        trim            : true,
        arrayNotation   : false
    But, it fails...
    Camilo Aguilar
    fails with what error?
    sorry for the late response
    Hey why tag text appear as $t attribute at json output?
    just trying to understand if it’s a standard or sth like that
    for instance
    <ReferenceNumber isPrimary="true" type="Shipment Number">002600904178-0000831</ReferenceNumber>
    here i’ll have a json with an attribute $t equal to 002600904178-0000831.
    Is that some standard I can rely on to write my code if for example I need to use another xml to json parsing library?
    thank you!
    got an error trying to install xml2json via npm
    gyp ERR! stack Error: gyp failed with exit code: 2
    gyp ERR! stack at ChildProcess.onCpExit (/home/altanaibisht/.nvm/v0.10.32/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
    gyp ERR! stack at ChildProcess.emit (events.js:98:17)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
    gyp ERR! System Linux 3.13.0-39-generic
    any quick resolutions ???
    Nabeel Shaheen
    Hi All, how can I configure xml2json to respect the xml sequence? at the moment its grouping the two similar elements into an array and when I convert json to XML back , I get a different seqeunce that breaks by assertion.
    Naitik Soni

    Got an error while installing xml2json on windows

    gyp ERR! configure error
    gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
    gyp ERR! stack at failNoPython (C:\Users\nsoni\AppData\Roaming\nvm\v6.3.1\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
    gyp ERR! stack at C:\Users\nsoni\AppData\Roaming\nvm\v6.3.1\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
    gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
    gyp ERR! System Windows_NT 6.3.9600
    gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\nsoni\AppData\Roaming\nvm\v6.3.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
    gyp ERR! cwd C:\Users\nsoni\Projects\Ingram\vcs-engine\FLOE3-activities\node_modules\node-expat
    gyp ERR! node -v v6.3.1
    gyp ERR! node-gyp -v v3.3.1
    gyp ERR! not ok
    vcs-engines@1.0.0 C:\Users\nsoni\Projects\Ingram\vcs-engine\FLOE3-activities
    `-- (empty)

    npm WARN vcs-engines@1.0.0 No repository field.
    npm ERR! Windows_NT 6.3.9600
    npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "xml2json"
    npm ERR! node v6.3.1
    npm ERR! npm v3.10.3
    npm ERR! code ELIFECYCLE

    npm ERR! node-expat@2.3.15 install: node-gyp rebuild
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-expat@2.3.15 install script 'node-gyp rebuild'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the node-expat package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-gyp rebuild
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR! npm bugs node-expat
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR! npm owner ls node-expat
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! C:\Users\nsoni\Projects\Ingram\vcs-engine\FLOE3-activities\npm-debug.log
    npm ERR! code 1

    Any hack ?
    Hi all!
    I just need advice or guidance
    Im using xml2json to read XML files and process som data on them
    Is there a way to use XML DOM in node and be able to use on it the wonderful Sizzlejs???
    Im trying to port kind of XML processor from browser to node
    Any ideas i've been google but does not seems to be so abvious
    Thanks in advance ;)
    Anil Franklin
    Hi, I am also facing same problem as Naitik Soni. Same error
    Which version works ?
    Anil Franklin
    any luck??
    Camilo Aguilar
    @naitik211, from the output it seems you are missing python in your system
    Marty McLaughlan

    Hi Guys - I'm having a lot of problems getting this to install on some of my environments.

    Can any suggest alternative packages?

    Jean-Philippe Gravel
    Marty McLaughlan
    @formix Worked perfectly cheers - I owe you a beer
    ĸrezzy ғella
    Hi guys, I am to Angular 2 and trying to install xml2json using npm. but I am not able to install it bcoz of python dependency. Can i just download zip from git hub and include it inside node_module folder? which all place i need to give a reference for dowloaded xml2json zip
    Il-Hwan Ryu
    oh this is very interesting
    Ben Hartouz Mohamed
    i have an issue with this package
    some one can help me ?
    Himanshu sharma
    I don't know why you use python , c for json parsing . It can be done by js code as well as
    But you will say we use node-expat which use libexpact lib , which is fastest to parse json . What about just using js to maipulate so .
    I perfer https://www.npmjs.com/package/xmljson over your repo now .
    Edmundo Rubio
    How Can I use this package in a React.js Component??
    Eumir Gaspar
    @Edxael what have you tried so far? shouldn't it just be a simple require?
    Ioannis Noukakis
    Hey guys. A link on your documentation has been compromised and now redirects to fishing websites: http://node-xmpp.org/doc/expat.html#installing-on-windows? Anyone to confirm this?
    A parse error occurs.
    The options remain default.
    Specifically, it occurs when returning the XML of RSS of "Ginco Magazin (https://magazine.ginco.io/index.xml)" to JSON.
    Is there any solution .....?
    Stephen Hendricks
    i attempted to install xml2json and im getting errors from node-gyp and saying something about python
    Does this package depend on python?
    Joshua V Sherman
    @z1haze yes you need to have gcc and python on your linux distro
    I submitted this to stack overflow last week, but nobody has responded, anyone know how to fix please? https://stackoverflow.com/questions/61682388/using-test-data-xml-to-run-xml2json-for-unit-testing-produces-an-error-in-the-co