Rev 8027 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{xmlChildren}\alias{xmlChildren}\alias{xmlChildren<-}\alias{xmlChildren.XMLNode}\alias{xmlChildren.XMLInternalNode}\alias{xmlChildren.XMLInternalDocument}\alias{xmlChildren<-,XMLInternalNode-method}\alias{xmlChildren<-,ANY-method}\title{ Gets the sub-nodes within an XMLNode object. }\description{These functions provide access to the children of the givenXML node.The simple accessor returns a list of child XMLNode objects within anXMLNode object.The assignment operator (\code{xmlChildren<-}) sets thechildren of the node to the given value and returns theupdated/modified node. No checking is currently doneon the type and values of the right hand side. This allowsthe children of the node to be arbitrary R objects. This canbe useful but means that one cannot rely on any structure in a nodebeing present..}\usage{xmlChildren(x, addNames= TRUE, ...)}\arguments{\item{x}{an object of class XMLNode.}\item{addNames}{a logical value indicating whether to add the XMLnames of the nodes as names of the R list.This is only relevant for XMLInternalNode objects as XMLNode objectsin R already have R-level names.}\item{\dots}{additional arguments for the particular methods,e.g. \code{omitTypes} for an XMLInternalNode.}}\value{A list whose elements are sub-nodes of the user-specifiedXMLNode. These are also of class XMLNode.}\references{\url{https://www.w3.org/XML/}}\author{Duncan Temple Lang}\seealso{\code{\link{xmlChildren}},\code{\link{xmlSize}},\code{\link{xmlTreeParse}}}\examples{fileName <- system.file("exampleData", "mtcars.xml", package="XML")doc <- xmlTreeParse(fileName)names(xmlChildren(doc$doc$children[["dataset"]]))}\keyword{file}