Namespace objects represent XML namespaces and provide an
association between a namespace prefix and a Unique Resource
Identifier (URI). The prefix is either the undefined value
or a string value that may be used to reference the namespace
within the lexical representation of an XML value. When an
XML object containing a namespace with an undefined prefix is
encoded as XML by the method toXMLString(), the implementation
will automatically generate a prefix.
The URI is a string value used to uniquely identify the namespace.
Returns the Uniform Resource Identifier (URI) of the Namespace object.
Constructor Details
Namespace()
Namespace()
Constructs a simple namespace where the
uri and prefix properties are set to an empty string.
A namespace with URI set to the empty string represents no namespace.
No namespace is used in XML objects to explicitly specify
that a name is not inside a namespace and may never be
associated with a prefix other than the empty string.
Constructs a Namespace object and assigns values to the
uri and prefix properties based on the type
of uriValue. If uriValue is a
Namespace object, a copy of the Namespace is constructed.
If uriValue is a QName object, the uri property is
set to the QName object's uri property.
Otherwise, uriValue is converted into a string and
assigned to the uri property.
Parameters:
uriValue - the value to use when constructing the Namespace.