6

Stupid thing and I can't figure it out. I'm viewing some XML files in Chrome (in this case a WSDL and an XSD). I need to save as files. The problem is that the file I get when I do is mangled with a lot of HTML and not actually the raw XML I was looking at.

<!-- saved from url=(0065)https://example.com/Configuration?wsdl -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div class="webkit-line-gutter-backdrop"></div><table><tbody><tr><td class="webkit-line-number" value="1">

How do I save/download the actual XML using Chrome?

0

7 Answers 7

3

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.

1
  • 1
    On recent versions of Chrome, the Save Page As menu is under the More Tools menu
    – Pascal
    Sep 24, 2015 at 12:40
2

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).

1

Chrome does not allow to execute "Save As ..." , even from the source when the target resource is in a HTTPS website using a self-signed certicate (or broken chain, invalid date,..). Even if the resource is inside the same HTTPS server where you previously agreed to access.

You have to install the corresponding certificate in the CA store to get rid of the HTTPS warning and also be able to download what you want from "Save As ..." menu.

By the way, there is no issue for resources that are not rendered inside Chrome : exe, zip,...

1

Right click page. View source. Select all. Paste into your favorite text editor. Save as .xml.

1

Just learned about the "download" attribute. Only compatible with newer browser versions though: http://www.w3schools.com/tags/att_a_download.asp

<a href="linktofile.xml" download>DOWNLOAD NOW</a>
1
  • This simply dont works, Still browser tries to open the xml instead of download Nov 24, 2023 at 7:10
0

You can try this which was posted on salesforce.stackexchange,Use the developer tools and go to the Network tab before you click the Generate button. Click the wsdl.jsp item and copy out of the Response tab. Start highlighting at the first character and then Ctrl+Shift+End.enter image description here

0

I just figured it out following these steps. Hope it helps.

To download xml file from url on Chrome to your local machine, follow these steps;

At the right side of the page you will see three dot (customize and control Google Chrome), right click --> More Tools-->Save Page As-->Save As (name your xml file. example--> name.xml ---> save --> it is saved in your local machine

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .