Description Usage Arguments Details Value Author(s) References See Also Examples
as.xml is generic, with a default method and methods for character
and data.frame. The intent is to convert text-like objects to informal
XML that can be navigated with XPath expressions, e.g. using package XML.
1 2 3 4 5 6 |
x |
an object to convert |
tag |
an XML element name for open and close tags in which to enclose
members of |
keyname |
an XML element name to hold each value of each column in |
key |
a vector of unique identifiers to distinguish each value of each column
in |
... |
name/value pairs to construct attributes in the ‘open’ tags (ignored for the data.frame method) |
The default method simply coerces its argument to character.
The character method pastes tag as an XML element name (in brackets)
before and after x. Dots are used to construct attributes. Like
tag itself, the attributes can be vectors; in both cases the usual
recycling rules apply, as for paste.
The data.frame method calls the character method on each of its columns, passing
keyname and keys as tag and key, respectively. keys should generally
be unique. Note that the columns have no parent: supply one manually with nest,
if necessary.
character
Tim Bergsma
http://metrumrg.googlecode.com
as.pxml.ext
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.