1\name{xmlSize} 2\alias{xmlSize} 3\alias{xmlSize.default} 4\alias{xmlSize.XMLDocument} 5\alias{xmlSize.XMLNode} 6\title{The number of sub-elements within an XML node.} 7\description{ 8 XML elements can contain other, nested sub-elements. 9 This generic function determines the number of 10such elements within a specified node. 11It applies to an object of class XMLNode or XMLDocument. 12} 13\usage{ 14xmlSize(obj) 15} 16\arguments{ 17 \item{obj}{ An an object of class XMLNode 18or XMLDocument.} 19} 20\value{ 21 an integer which is the \code{\link{length}} 22 of the value from \code{\link{xmlChildren}}. 23} 24\references{\url{http://www.w3.org/XML}, \url{http://www.jclark.com/xml}, 25\url{http://www.omegahat.net} } 26\author{ Duncan Temple Lang } 27 28\seealso{ 29\code{\link{xmlChildren}}, 30\code{\link{xmlAttrs}}, 31\code{\link{xmlName}}, 32\code{\link{xmlTreeParse}} 33} 34 35\examples{ 36 fileName <- system.file("exampleData", "mtcars.xml", package="XML") 37 doc <- xmlTreeParse(fileName) 38 xmlSize(doc) 39 xmlSize(doc$doc$children[["dataset"]][["variables"]]) 40} 41\keyword{file} 42 43