Blame | Last modification | View Log | Download | RSS feed
\name{setXMLNamespace}\alias{setXMLNamespace}\title{Set the name space on a node}\description{This function sets the name space for an XML node, typicallyan internal node. We can use it to either define a new namespaceand use that, or refer to a name space definition in an ancestorof the current node.}\usage{setXMLNamespace(node, namespace, append = FALSE)}\arguments{\item{node}{the node on which the name space is to be set}\item{namespace}{the name space to use for the node. This can be aname space prefix (string) defined in an ancestor node, or a namedcharacter vector of the form \code{c(prefix = URI)} that defines anew namespace on this node, or we can use a name space objectcreated with \code{\link{newXMLNamespace}}.}\item{append}{currently ignored.}}\value{An object of class \code{XMLNamespaceRef} which is a reference to thenative/internal/C-level name space object.}%\references{}\author{Duncan Temple Lang}\seealso{\code{\link{newXMLNamespace}}\code{\link{removeXMLNamespaces}}}\examples{# define a new namespacee = newXMLNode("foo")setXMLNamespace(e, c("r" = "http://www.r-project.org"))# use an existing namespace on an ancestor nodee = newXMLNode("top", namespaceDefinitions = c("r" = "http://www.r-project.org"))setXMLNamespace(e, "r")e}\keyword{programming}