How make Safari open XML file instead of downloading it

safarixml

I'm on MacOS Sierra. When I click on a link to XML file, Safari downloads it. Instead I want to view the XML right in the browser. Is there a way to accomplish this?

Best Answer

Safari does open XML files, unless the server specifically tells Safari to download the file.
It's currently not possible to override the server's instruction to download instead of view.