EVOLUTION-MANAGER
Edit File: download_xml.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Download a HTML or XML file</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for download_xml {xml2}"><tr><td>download_xml {xml2}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Download a HTML or XML file</h2> <h3>Description</h3> <p>Libcurl implementation of <code>C_download</code> (the "internal" download method) with added support for https, ftps, gzip, etc. Default behavior is identical to <code><a href="../../utils/html/download.file.html">download.file()</a></code>, but request can be fully configured by passing a custom <code><a href="../../curl/html/handle.html">curl::handle()</a></code>. </p> <h3>Usage</h3> <pre> download_xml( url, file = basename(url), quiet = TRUE, mode = "wb", handle = curl::new_handle() ) download_html( url, file = basename(url), quiet = TRUE, mode = "wb", handle = curl::new_handle() ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>url</code></td> <td> <p>A character string naming the URL of a resource to be downloaded.</p> </td></tr> <tr valign="top"><td><code>file</code></td> <td> <p>A character string with the name where the downloaded file is saved.</p> </td></tr> <tr valign="top"><td><code>quiet</code></td> <td> <p>If <code>TRUE</code>, suppress status messages (if any), and the progress bar.</p> </td></tr> <tr valign="top"><td><code>mode</code></td> <td> <p>A character string specifying the mode with which to write the file. Useful values are <code>"w"</code>, <code>"wb"</code> (binary), <code>"a"</code> (append) and <code>"ab"</code>.</p> </td></tr> <tr valign="top"><td><code>handle</code></td> <td> <p>a curl handle object</p> </td></tr> </table> <h3>Details</h3> <p>The main difference between <code>curl_download</code> and <code>curl_fetch_disk</code> is that <code>curl_download</code> checks the http status code before starting the download, and raises an error when status is non-successful. The behavior of <code>curl_fetch_disk</code> on the other hand is to proceed as normal and write the error page to disk in case of a non success response. </p> <h3>Value</h3> <p>Path of downloaded file (invisibly). </p> <h3>See Also</h3> <p><a href="../../curl/html/curl_download.html">curl_download</a> </p> <h3>Examples</h3> <pre> ## Not run: download_html("http://tidyverse.org/index.html") ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>xml2</em> version 1.3.2 <a href="00Index.html">Index</a>]</div> </body></html>