parseXMLTree | R Documentation |
Read an XML file into an R object
parseXMLTree(file, drop = NULL, object = FALSE)
file |
Character string, valid path to the XML file which should be parsed. |
drop |
Character vector with the possible values |
object |
Logical, if |
An object of class XiMpLe_doc
with four slots:
file
:Full path to the parsed file,
or "object"
if object=TRUE
.
xml
:XML declaration, if found.
dtd
:Doctype definition, if found.
children
:A list of objects of class XiMpLe_node
,
with the elements
"name"
(the node name), "attributes"
(list of attributes, if found),
"children"
(list of XiMpLe_node
object, if found) and "value"
(text value between a pair of start/end tags, if found).
XiMpLe_node
,
XiMpLe_doc
## Not run:
sample.XML.object <- parseXMLTree("~/data/sample_file.xml")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.