Create a response with a XML file response. It receives a string with the XML content and set the Content-Type header to application/xml; charset=utf-8 always.
application/xml; charset=utf-8
This is useful to dynamically create a XML file from a Resource Route.
export let loader: LoaderFunction = async ({ request }) => { return xml("<?xml version='1.0'?><catalog></catalog>");} Copy
export let loader: LoaderFunction = async ({ request }) => { return xml("<?xml version='1.0'?><catalog></catalog>");}
Create a response with a XML file response. It receives a string with the XML content and set the Content-Type header to
application/xml; charset=utf-8
always.This is useful to dynamically create a XML file from a Resource Route.