Comparing version 0.1.6 to 0.1.7
@@ -1,3 +0,1 @@ | ||
require('./proto'); | ||
var sax = require('sax'), | ||
@@ -19,9 +17,9 @@ sys = require('sys'), | ||
obj['#'] = ""; | ||
if(Object.keys(node.attributes).length) { | ||
node.attributes.forEach( function(v,k) { | ||
for (var key in node.attributes) { | ||
if (node.attributes.hasOwnProperty(key)) { | ||
if(typeof obj['@'] === 'undefined') { | ||
obj['@'] = {}; | ||
} | ||
obj['@'][k] = v; | ||
}); | ||
obj['@'][key] = node.attributes[key]; | ||
} | ||
} | ||
@@ -28,0 +26,0 @@ obj['#name'] = node.name; // need a place to store the node name |
{ | ||
"name": "xml2js", | ||
"description": "Simple XML to JavaScript object converter.", | ||
"version": "0.1.6", | ||
"author": "maqr <maqr.lollerskates@gmail.com>", | ||
"keywords": ["xml", "json"], | ||
"directories": { "lib": "./lib" }, | ||
"main": "./lib/index", | ||
"dependencies" : { "sax" : ">=0.1.1" }, | ||
"name" : "xml2js", | ||
"description" : "Simple XML to JavaScript object converter.", | ||
"keywords" : ["xml", "json"], | ||
"homepage" : "https://github.com/Leonidas-from-XIV/node-xml2js", | ||
"version" : "0.1.7", | ||
"author" : "Marek Kubica <marek@xivilization.net> (http://xivilization.net)", | ||
"contributors" : [ | ||
"maqr <maqr.lollerskates@gmail.com> (https://github.com/maqr)", | ||
"Ben Weaver (http://benweaver.com/)", | ||
"Jae Kwon (https://github.com/jaekwon)", | ||
"Jim Robert" | ||
], | ||
"main" : "./lib/xml2js", | ||
"directories" : { | ||
"lib": "./lib" | ||
}, | ||
"repository" : { | ||
"type": "git", | ||
"url": "https://github.com/Leonidas-from-XIV/node-xml2js.git" | ||
"type" : "git", | ||
"url" : "https://github.com/Leonidas-from-XIV/node-xml2js.git" | ||
}, | ||
"dependencies" : { | ||
"sax" : ">=0.1.1" | ||
}, | ||
"devDependencies" : { | ||
"zap" : ">=0.2.0" | ||
} | ||
} |
@@ -6,6 +6,16 @@ node-xml2js | ||
----------- | ||
Simple XML to JavaScript object converter. Uses [sax-js](http://github.com/isaacs/sax-js/). Install with [npm](http://github.com/isaacs/npm) :) | ||
Simple XML to JavaScript object converter. Uses [sax-js](http://github.com/isaacs/sax-js/). | ||
See the tests for examples until docs are written. | ||
Note: If you're looking for a full DOM parser, you probably want [JSDom](http://github.com/tmpvar/jsdom). | ||
Note: If you're looking for a full DOM parser, you probably want | ||
[JSDom](http://github.com/tmpvar/jsdom). | ||
Installation | ||
------------ | ||
Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm | ||
install xml2js` which will download xml2js and all dependencies. | ||
Simple usage | ||
@@ -12,0 +22,0 @@ ----------- |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1
36
0
8661
1
7
127