xmlSize.RdXML elements can contain other, nested sub-elements. This generic function determines the number of such elements within a specified node. It applies to an object of class XMLNode or XMLDocument.
xmlSize(obj)an integer which is the length
of the value from xmlChildren.
fileName <- system.file("exampleData", "mtcars.xml", package="XML")
doc <- xmlTreeParse(fileName)
xmlSize(doc)
#> [1] 2
xmlSize(doc$doc$children[["dataset"]][["variables"]])
#> [1] 11