Description Usage Arguments Value Author(s) References See Also Examples
These provide a simplified syntax for extracting the children of an XML node.
1 2 3 4 5 6 |
x |
the XML node or the top-level document content in which the children are to be accessed.
The |
... |
the identifiers for the children to be retrieved,
given as integer indices, names, etc. in the usual format for the
generic |
all |
logical value. When ... is a character vector, a value
of |
A list or single element containing the
children of the XML node given by obj
and identified by ....
Duncan Temple Lang
http://www.w3.org/XML, http://www.omegahat.org/RSXML
xmlAttrs
[<-.XMLNode
[[<-.XMLNode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | f = system.file("exampleData", "gnumeric.xml", package = "XML")
top = xmlRoot(xmlTreeParse(f))
# Get the first RowInfo element.
top[["Sheets"]][[1]][["Rows"]][["RowInfo"]]
# Get a list containing only the first row element
top[["Sheets"]][[1]][["Rows"]]["RowInfo"]
top[["Sheets"]][[1]][["Rows"]][1]
# Get all of the RowInfo elements by position
top[["Sheets"]][[1]][["Rows"]][1:xmlSize(top[["Sheets"]][[1]][["Rows"]])]
# But more succinctly and accurately, get all of the RowInfo elements
top[["Sheets"]][[1]][["Rows"]]["RowInfo", all = TRUE]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.