Videos
Is XML Viewer free?
What is XML Viewer?
Can I edit these XML files?
Factsheet
Simply click the File button (the 3 lines), and click Save Page As.
For example, I went to xml-sitemaps.com/sitemap.xml and clicked Save Page As. It saved as XML to my local machine and loaded as such. Without any HTML.
The fact yours is saving HTML suggests the page you're saving is not an XML page but is an HTML page which just references XML. If that is the case, you'll need to locate the locations of the XML, navigate to them in the browser and then "Save Page As."
In later versions of Chrome, "Save Page As" is now under More tools section in the options menu.
I just figured this out. If you want to save the file as XML, make sure you are looking at the page source (Tools->View source or Control+U).
After trying a lot of solutions, This worked for me.
Try to provide a dummy argument to the file link as shown below.
<a href="http://link/to/the/file.xml?dummy=dummy" download>Download Now</a>
There's an HTTP header called Content-Disposition, which is defined in RFC1806 as follows:
2.1 The Inline Disposition Type
A bodypart should be marked
inlineif it is intended to be displayed automatically upon display of the message. Inline bodyparts should be presented in the order in which they occur, subject to the normal semantics of multipart messages.2.2 The Attachment Disposition Type
Bodyparts can be designated
attachmentto indicate that they are separate from the main body of the mail message, and that their display should not be automatic, but contingent upon some further action of the user. The MUA might instead present the user of a bitmap terminal with an iconic representation of the attachments, or, on character terminals, with a list of attachments from which the user could select for viewing or storage.
In order to put the header message on the xml file, you'd need the access to the server-side. For example using php's header function you could write something like:
header('Content-Disposition: attachment; filename="some.xml"');
If you don't have access to the server-side, you could try the following JavaScript trick that I found Googling (not sure if it would work):
<a href="javascript:void(0);" onclick="document.execCommand('SaveAs',true,'some.xml');">Save this page</a>