Add drupal_xml_output to manage XML as drupal_json_output manage JSON.