Comparing version 0.2.1 to 0.2.2
@@ -28,3 +28,4 @@ // Generated by CoffeeScript 1.4.0 | ||
explicitRoot: false, | ||
validator: null | ||
validator: null, | ||
xmlns: false | ||
}, | ||
@@ -42,3 +43,4 @@ "0.2": { | ||
explicitRoot: true, | ||
validator: null | ||
validator: null, | ||
xmlns: false | ||
} | ||
@@ -81,2 +83,5 @@ }; | ||
} | ||
if (this.options.xmlns) { | ||
this.options.xmlnskey = this.options.attrkey + "ns"; | ||
} | ||
this.reset(); | ||
@@ -91,3 +96,4 @@ } | ||
trim: false, | ||
normalize: false | ||
normalize: false, | ||
xmlns: this.options.xmlns | ||
}); | ||
@@ -125,2 +131,8 @@ err = false; | ||
obj["#name"] = _this.options.normalizeTags ? node.name.toLowerCase() : node.name; | ||
if (_this.options.xmlns) { | ||
obj[_this.options.xmlnskey] = { | ||
uri: node.uri, | ||
local: node.local | ||
}; | ||
} | ||
return stack.push(obj); | ||
@@ -127,0 +139,0 @@ }; |
@@ -6,3 +6,3 @@ { | ||
"homepage" : "https://github.com/Leonidas-from-XIV/node-xml2js", | ||
"version" : "0.2.1", | ||
"version" : "0.2.2", | ||
"author" : "Marek Kubica <marek@xivilization.net> (http://xivilization.net)", | ||
@@ -33,9 +33,9 @@ "contributors" : [ | ||
"dependencies" : { | ||
"sax" : ">=0.1.1" | ||
"sax" : ">=0.4.2" | ||
}, | ||
"devDependencies" : { | ||
"coffee-script" : ">=1.0.1", | ||
"zap" : ">=0.2.4-2", | ||
"zap" : ">=0.2.4-3", | ||
"docco" : ">=0.3.0" | ||
} | ||
} |
@@ -137,11 +137,12 @@ node-xml2js | ||
for an example. | ||
* `xmlns` (default `false`): Give each element a field usually called '$ns' | ||
(the first character is the same as attrkey) that contains its local name | ||
and namespace URI. | ||
These default settings are for backward-compatibility. These are scheduled to | ||
change to a more 'clean' way of parsing in version 0.2. | ||
Updating to new version | ||
======================= | ||
As version 0.2 will change the default parsing settings version 0.1.14 | ||
introduced the default settings for version 0.2. | ||
Version 0.2 changed the default parsing settings, but version 0.1.14 introduced | ||
the default settings for version 0.2, so these settings can be tried before the | ||
migration. | ||
@@ -148,0 +149,0 @@ ```javascript |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
33475
216
177
Updatedsax@>=0.4.2