Skip to content

dxg/node-expat-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-expat-object

What?

C based XML -> JS Object conversion

Why?

Because 3MB SOAP files

How?

Using libexpat and some C++ code

Approaches:

  1. Build JS object in c - fast
  2. Build JS object in js buffer - faster
  3. Build JS object in js string - faster
  4. Build JS Object using JSON.parse - fastest

Instructions:

  1. Find a suitably large XML file, eg ftp://ftp.archive.de.uu.net/pub/documents/rfc/rfc-index.xml
  2. Rename it to resp.xml
  3. Checkout the branch you want
  4. npm install -g node-gyp
  5. npm install
  6. node-gyp configure
  7. node-gyp build
  8. node test.js

You will need to run steps 5-7 every time you change branches.

This package hasn't yet been released to npm. Needs more testing.

Note that the json branch currently crashes with rfc-index.xml because I forgot to escape "

Thanks

To node-xmpp/node-expat which inspired this package. I copied their DEPS folder.

About

Convert XML to JSON, fast.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published