/**
* Parses json to xml recursively.
* @param {String|Buffer} json The JSON string to be parsed.
* @param {String} xml The ongoing xml string
* being generated from the json parameter.
* @return {String} The ongoing xml.
**/
}
} else {
obj = json;
}
var keys = Object.keys(obj);
var len = keys.length;
for (var i = 0; i < len; i++) {
var key = keys[i];
if (Array.isArray(obj[key])) {
var elems = obj[key];
var l = elems.length;
for (var j = 0; j < l; j++) {
xml += '<' + key + '>';