Created xml_curl function to handle xml requests, json_curl minor refactoring.