powered by
This is a convenient way to obtain the XML tag name of each of the sub-nodes of a given XMLNode object.
XMLNode
# S3 method for XMLNode names(x)
A character vector returning the tag names of the sub-nodes of the given XMLNode argument.
the XMLNode whose sub-node tag names are being queried.
Duncan Temple Lang
https://www.w3.org/XML//, http://www.jclark.com/xml/, https://www.omegahat.net
xmlApply xmlSApply
xmlApply
xmlSApply
doc <- xmlTreeParse(system.file("exampleData", "mtcars.xml", package="XML")) names(xmlRoot(doc)) r <- xmlRoot(doc) r[names(r) == "variables"]
Run the code above in your browser using DataLab