The number of sub-elements within an XML node.

DESCRIPTION:

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.

USAGE:

xmlSize(obj)

ARGUMENTS:

obj
An object of class XMLNode or XMLDocument.

VALUE:

an integer which is the of the value from .

AUTHOR(S):

Duncan Temple Lang

REFERENCES:

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

SEE ALSO:

, , ,

EXAMPLES:

  fileName <- system.file("exampleData", "mtcars.xml", package="XML")
  doc <- xmlTreeParse(fileName)
  xmlSize(doc)
  xmlSize(doc$doc$children[["dataset"]][["variables"]])