xmlSize

0th

Percentile

The number of sub-elements within an XML node.

XML 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.

Keywords
file
Usage
xmlSize(obj)
Arguments
obj

An an object of class XMLNode or XMLDocument.

Value

an integer which is the length of the value from xmlChildren.

References

http://www.w3.org/XML, http://www.jclark.com/xml, http://www.omegahat.net

See Also

xmlChildren, xmlAttrs, xmlName, xmlTreeParse

Aliases
  • xmlSize
  • xmlSize.default
  • xmlSize.XMLDocument
  • xmlSize.XMLNode
Examples
# NOT RUN {
  fileName <- system.file("exampleData", "mtcars.xml", package="XML") 
  doc <- xmlTreeParse(fileName)
  xmlSize(doc)
  xmlSize(doc$doc$children[["dataset"]][["variables"]])
# }
Documentation reproduced from package XML, version 3.98-1.20, License: BSD_2_clause + file LICENSE

Community examples

Looks like there are no examples yet.