EVOLUTION-MANAGER
Edit File: xmlSize.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: The number of sub-elements within an XML node.</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 xmlSize {XML}"><tr><td>xmlSize {XML}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>The number of sub-elements within an XML node.</h2> <h3>Description</h3> <p>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. </p> <h3>Usage</h3> <pre> xmlSize(obj) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>obj</code></td> <td> <p> An an object of class XMLNode or XMLDocument.</p> </td></tr> </table> <h3>Value</h3> <p>an integer which is the <code><a href="../../base/html/length.html">length</a></code> of the value from <code><a href="xmlChildren.html">xmlChildren</a></code>. </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>, <a href="http://www.jclark.com/xml">http://www.jclark.com/xml</a>, <a href="http://www.omegahat.net">http://www.omegahat.net</a> </p> <h3>See Also</h3> <p><code><a href="xmlChildren.html">xmlChildren</a></code>, <code><a href="xmlAttrs.html">xmlAttrs</a></code>, <code><a href="xmlName.html">xmlName</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) xmlSize(doc) xmlSize(doc$doc$children[["dataset"]][["variables"]]) </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>