EVOLUTION-MANAGER
Edit File: xmlChildren.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Gets the sub-nodes within an XMLNode object.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for xmlChildren {XML}"><tr><td>xmlChildren {XML}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Gets the sub-nodes within an XMLNode object. </h2> <h3>Description</h3> <p>These functions provide access to the children of the given XML node. The simple accessor returns a list of child XMLNode objects within an XMLNode object. </p> <p>The assignment operator (<code>xmlChildren<-</code>) sets the children of the node to the given value and returns the updated/modified node. No checking is currently done on the type and values of the right hand side. This allows the children of the node to be arbitrary R objects. This can be useful but means that one cannot rely on any structure in a node being present.. </p> <h3>Usage</h3> <pre> xmlChildren(x, addNames= TRUE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an object of class XMLNode.</p> </td></tr> <tr valign="top"><td><code>addNames</code></td> <td> <p>a logical value indicating whether to add the XML names of the nodes as names of the R list. This is only relevant for XMLInternalNode objects as XMLNode objects in R already have R-level names. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional arguments for the particular methods, e.g. <code>omitTypes</code> for an XMLInternalNode.</p> </td></tr> </table> <h3>Value</h3> <p>A list whose elements are sub-nodes of the user-specified XMLNode. These are also of class XMLNode. </p> <h3>Author(s)</h3> <p>Duncan Temple Lang</p> <h3>References</h3> <p><a href="http://www.w3.org/XML">http://www.w3.org/XML</a></p> <h3>See Also</h3> <p><code><a href="xmlChildren.html">xmlChildren</a></code>,<code><a href="xmlSize.html">xmlSize</a></code>, <code><a href="xmlTreeParse.html">xmlTreeParse</a></code> </p> <h3>Examples</h3> <pre> fileName <- system.file("exampleData", "mtcars.xml", package="XML") doc <- xmlTreeParse(fileName) names(xmlChildren(doc$doc$children[["dataset"]])) </pre> <hr /><div style="text-align: center;">[Package <em>XML</em> version 3.99-0.3 <a href="00Index.html">Index</a>]</div> </body></html>