Write a JavaScript function that receives a string of a JSON object and outputs a string of a XML version of that object. Please make sure that it can handle recursive objects (that is, keys who's value is another  object).