node {XiMpLe} | R Documentation |
Extract/manipulate a node or parts of it from an XML tree
Description
This method can be used to get parts of a parsed XML tree object, or to fill it with new values.
XiMpLe.XML
is a class union for objects of classes XiMpLe_node
and XiMpLe_doc
.
Usage
node(
obj,
node = list(),
what = NULL,
cond.attr = NULL,
cond.value = NULL,
element = NULL
)
## S4 method for signature 'XiMpLe.XML'
node(
obj,
node = list(),
what = NULL,
cond.attr = NULL,
cond.value = NULL,
element = NULL
)
node(
obj,
node = list(),
what = NULL,
cond.attr = NULL,
cond.value = NULL,
element = NULL
) <- value
## S4 replacement method for signature 'XiMpLe.XML'
node(
obj,
node = list(),
what = NULL,
cond.attr = NULL,
cond.value = NULL,
element = NULL
) <- value
Arguments
obj |
An object of class |
node |
A list of node names (or their numeric values), where each element is the child of its previous element. duplicate matches will be returned as a list. |
what |
A character string,
must be a valid slot name of class |
cond.attr |
A named character string, to further filter the returned results.
If not |
cond.value |
A character string, similar to |
element |
A character string naming one list element of the node slot. If |
value |
The value to set. |
Examples
## Not run:
node(my.xml.tree, node=list("html","body"), what="attributes")
node(my.xml.tree, node=list("html","head","title"), what="value") <- "foobar"
## End(Not run)