
Last chance! 50% off unlimited learning
Sale ends in
This function, and associated methods,
define a name space prefix = URI
combination for the
given XML node.
It can also optionally make this name space the
default namespace for the node.
newXMLNamespace(node, namespace, prefix = names(namespace), set = FALSE)
An name space definition object whose class corresponds
to the type of XML node given in node
.
the XML node for which the name space is to be defined.
the namespace(s).
This can be a simple character vector giving the URI,
a named character vector giving the prefix = URI pairs, with the prefixes being the names
of the character vector,
or one or more (a list) of XMLNamespace
objects, e.g. returned from a call to
xmlNamespaceDefinitions
the prefixes to be associated with the URIs given in namespace
.
a logical value indicating whether to set the namespace for this node to this newly created name space definition.
Duncan Temple Lang
~put references to the literature/web site here ~
Constructors for different XML node types - newXMLNode
xmlNode
.
newXMLNamespace
.
foo = newXMLNode("foo")
ns = newXMLNamespace(foo, "http://www.r-project.org", "r")
as(ns, "character")
Run the code above in your browser using DataLab