\Header{length.XMLNode}{Determine the number of children in an XMLNode object.}
\keyword{file}{length.XMLNode}
\begin{Description}\relax
This function is a simple way to compute the number
of sub-nodes (or children) an \code{XMLNode} object
possesses.
It is provided as a convenient form of calling the
\code{\Link{xmlSize}} function.
\end{Description}
\begin{Usage}
\begin{verbatim}
 length.XMLNode(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] the \code{XMLNode} object whose length is to be queried.
\end{ldescription}
\end{Arguments}
\begin{Value}
An integer giving the number of sub-nodes
of this node.
\end{Value}
\begin{Author}\relax
Duncan Temple Lang
\end{Author}
\begin{References}\relax
\url{http://www.w3.org/XML}, \url{http://www.jclark.com/xml},
\url{http://www.omegahat.org}
\end{References}
\begin{SeeAlso}\relax
\code{\Link{xmlSize}}
\code{\Link{xmlChildren}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  doc <- xmlTreeParse(system.file("exampleData", "mtcars.xml", package="XML"))
  r <- xmlRoot(doc, skip=TRUE)
  length(r)
    # get the last entry
  r[[length(r)]]
\end{ExampleCode}
\end{Examples}

