Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "xml-js", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A convertor between XML text and Javascript object / JSON text.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -144,3 +144,3 @@ ![XML ⇔ JS/JSON](http://nashwaan.github.io/xml-js/images/logo.svg) | ||
var json = require('fs').readFileSync('test.json', 'utf8'); | ||
var options = {ignoreText: true, spaces: 4}; | ||
var options = {ignoreComment: true, spaces: 4}; | ||
var result = convert.json2xml(json, options); | ||
@@ -174,3 +174,3 @@ console.log(result); | ||
var xml = require('fs').readFileSync('test.xml', 'utf8'); | ||
var options = {ignoreText: true, alwaysChildren: true}; | ||
var options = {ignoreComment: true, alwaysChildren: true}; | ||
var result = convert.xml2js(xml, options); // or convert.xml2json(xml, options) | ||
@@ -191,2 +191,3 @@ console.log(result); | ||
| `addParent` | `false` | Whether to add `parent` property in each element object that points to parent object. | | ||
| `alwaysArray` | `false` | Whether to always put sub element, even if it is one only, as an item inside an array. `<a><b/></a>` will be `a:[{b:[{}]}]` rather than `a:{b:{}}` (applicable for compact output only). | | ||
| `alwaysChildren` | `false` | Whether to always generate `elements` property even when there are no actual sub elements (applicable for non-compact output). | | ||
@@ -193,0 +194,0 @@ | `ignoreDeclaration` | `false` | Whether to ignore writing declaration property. That is, no `declaration` property will be generated. | |
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
60950
320