xmljson
Translates between JSON and XML formats
Getting Started
Install the module with: npm install xmljson
Convert XML to JSON
// Load the modulevar to_json = to_json; // An XML stringvar xml = '' + '<data>' + '<prop1>val1</prop1>' + '<prop2>val2</prop2>' + '<prop3>val3</prop3>' + '</data>'; ;
Convert JSON to XML
// Load the modulevar to_xml = to_xml; // A JSON stringvar json = '' + '{' + '"prop1":"val1",' + '"prop2":"val2",' + '"prop3":"val3"' + '}'; ;
Release History
This module is semantically versioned: http://semver.org
2013-07-27
Version 0.2.0 - Support child elements where some have duplicate names and some do not
2013-05-29
Version 0.1.0 - Initial release
Contributing
Before writing code, we suggest you search for issues or create a new one to confirm where your contribution fits into our roadmap.
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Authors
Adam Alexander
Benjamin Dean
Copyright and license
Copyright (c) 2013 ExactTarget
Licensed under the MIT License (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the COPYING file.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.