Modified xml output to support custom_headers