XMLNode | R Documentation |
XiMpLe_node
objectsCan be used to create XML nodes.
XMLNode( tag_name, ..., attrs, shine, namespace, namespaceDefinitions, .children = list(...) )
tag_name |
Character string, the tag name. |
... |
Optional children for the tag. Must be either objects of class |
attrs |
An optional named list of attributes. Will be appended to attributes already defined in
the |
shine |
A numeric integer value between 0 and 2,
overwriting the |
namespace |
Currently ignored. |
namespaceDefinitions |
Currently ignored. |
.children |
Alternative way of specifying children,
if you have them already as a list.
This argument completely replaces values defined in the |
To generate a CDATA node, set tag_name="![CDATA["
, to create a comment,
set tag_name="!--"
.
Note that all defined attributes will silently be dropped if a text node, CDATA node or comment is generated.
An object of class XiMpLe_node
.
XMLTree
,
pasteXML
(sample.XML.node <- XMLNode("a", attrs=list( href="http://example.com", target="_blank" ), .children="klick here!" )) # This is equivalent (sample.XML.node2 <- XMLNode("a", "klick here!", href="http://example.com", target="_blank" )) # As is this (sample.XML.node3 <- XMLNode("a", .children=list( "klick here!", href="http://example.com", target="_blank" ) ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.