Convert hash to xml