XMLNode: Constructor function for XiMpLe.node objects

Description Usage Arguments Details Value See Also Examples

View source: R/XMLNode.R

Description

Can be used to create XML nodes.

Usage

1
2
XMLNode(name, ..., attrs = NULL, namespace = "",
  namespaceDefinitions = NULL, .children = list(...))

Arguments

name

Character string, the tag name.

...

Optional children for the tag. Must be either objects of class XiMpLe.node or character strings, which are treated as simple text values. If this is empty, the tag will be treated as an empty tag. To force a closing tag, supply an empty string, i.e. "".

attrs

An optional named list of attributes.

namespace

Currently ignored.

namespaceDefinitions

Currently ignored.

.children

Alternative way of specifying children, if you have them already as a list.

Details

To generate a CDATA node, set name="![CDATA[", to create a comment, set name="!--".

Value

An object of class XiMpLe.node.

See Also

XMLTree, pasteXML

Examples

1
2
3
sample.XML.node <- XMLNode("a",
  attrs=list(href="http://example.com", target="_blank"),
  .children="klick here!")

rkward-community/XiMpLe documentation built on Dec. 13, 2017, 10:11 p.m.