I like xml. I like json. I like javascript. So I made a little tool to convert from json to xml.
Last version is v0.1
- v0.1 (demo here) : initial version
First, import the json2xml.js.
Then, do something like this :
var xml = json2xml.convert(obj, "data");
This will convert your json object (obj) to xml.
The json2xml.convert function needs 2 parameters :
- The json object (called "obj" in the example).
- The xml root name ("data" in the example).
This plugin is licensed under the terms of the WTF Public License (see here and here) :
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO.
You can contact me at siegfried.ehretATgmail.com (replace AT with @) Please write "json2xml" or something in your subject.