EVOLUTION-MANAGER
Edit File: parseURI.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: Parse a URI string into its elements</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 parseURI {XML}"><tr><td>parseURI {XML}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Parse a URI string into its elements</h2> <h3>Description</h3> <p>This breaks a URI given as a string into its different elements such as protocol/scheme, host, port, file name, query. This information can be used, for example, when constructing URIs relative to a base URI. </p> <p>The return value is an S3-style object of class <code>URI</code>. </p> <p>This function uses libxml routines to perform the parsing. </p> <h3>Usage</h3> <pre> parseURI(uri) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>uri</code></td> <td> <p>a single string</p> </td></tr> </table> <h3>Value</h3> <p>A list with 8 elements </p> <table summary="R valueblock"> <tr valign="top"><td><code>scheme</code></td> <td> <p>the name of the protocol being used, http, ftp as a string.</p> </td></tr> <tr valign="top"><td><code>authority</code></td> <td> <p>a string represeting a rarely used aspect of URIs</p> </td></tr> <tr valign="top"><td><code>server</code></td> <td> <p>a string identifying the host, e.g. www.omegahat.net</p> </td></tr> <tr valign="top"><td><code>user</code></td> <td> <p>a string giving the name of the user, e.g. in FTP "ftp://duncan@www.omegahat.net", this would yield "duncan"</p> </td></tr> <tr valign="top"><td><code>path</code></td> <td> <p>a string identifying the path of the target file</p> </td></tr> <tr valign="top"><td><code>query</code></td> <td> <p>the CGI query part of the string, e.g. the bit after '?' of the form <code>name=value&name=value</code></p> </td></tr> <tr valign="top"><td><code>fragment</code></td> <td> <p>a string giving the coo</p> </td></tr> <tr valign="top"><td><code>port</code></td> <td> <p>an integer identifying the port number on which the connection is to be made</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="getRelativeURL.html">getRelativeURL</a></code> </p> <h3>Examples</h3> <pre> parseURI("http://www.omegahat.net:8080/RCurl/index.html") parseURI("ftp://duncan@www.omegahat.net:8080/RCurl/index.html") parseURI("ftp://duncan@www.omegahat.net:8080/RCurl/index.html#my_anchor") as(parseURI("http://duncan@www.omegahat.net:8080/RCurl/index.html#my_anchor"), "character") as(parseURI("ftp://duncan@www.omegahat.net:8080/RCurl/index.html?foo=1&bar=axd"), "character") </pre> <hr /><div style="text-align: center;">[Package <em>XML</em> version 3.99-0.3 <a href="00Index.html">Index</a>]</div> </body></html>