EVOLUTION-MANAGER
Edit File: xmlName.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: Extraces the tag name of 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 xmlName {XML}"><tr><td>xmlName {XML}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Extraces the tag name of an XMLNode object.</h2> <h3>Description</h3> <p>Each XMLNode object has an element or tag name introduced in the <code><name ...></code> entry in an XML document. This function returns that name. </p> <p>We can also set that name using <code>xmlName(node) <- "name"</code> and the value can have an XML name space prefix, e.g. <code>"r:name"</code>. </p> <h3>Usage</h3> <pre> xmlName(node, full = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>node</code></td> <td> <p>The XMLNode object whose tag name is being requested.</p> </td></tr> <tr valign="top"><td><code>full</code></td> <td> <p>a logical value indicating whether to prepend the namespace prefix, if there is one, or return just the name of the XML element/node. <code>TRUE</code> means prepend the prefix.</p> </td></tr> </table> <h3>Value</h3> <p>A character vector of length 1 which is the <code>node$name</code> entry. </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="xmlTreeParse.html">xmlTreeParse</a></code> </p> <h3>Examples</h3> <pre> fileName <- system.file("exampleData", "test.xml", package="XML") doc <- xmlTreeParse(fileName) xmlName(xmlRoot(doc)[[1]]) tt = xmlRoot(doc)[[1]] xmlName(tt) xmlName(tt) <- "bob" # We can set the node on an internal object also. n = newXMLNode("x") xmlName(n) xmlName(n) <- "y" xmlName(n) <- "r:y" </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>