render method
Renders the response by converting the data to XML and writing it to the response.
Implementation
@override
void render(Response response) {
// Set the content type of the response to 'application/xml'.
writeContentType(response);
// Serialize the data to XML format.
final xmlData = _convertToXml(data);
// Write the serialized XML data to the response with pretty formatting.
response.write(xmlData.toXmlString(pretty: true));
}