QName objects are used to represent qualified names of XML
elements and attributes. Each QName object has a local name
of type string and a namespace URI of type string or null.
When the namespace URI is null, this qualified name matches
any namespace.
If the QName of an XML element is specified without identifying a
namespace (i.e., as an unqualified identifier), the uri property
of the associated QName will be set to the in-scope default
namespace. If the QName of an XML attribute is
specified without identifying a namespace, the uri property of
the associated QName will be the empty string representing no namespace.
Constructs a QName object that is a copy of the specified
qname. If the argument is not
a QName object, the argument is converted to a string and assigned
to the localName property of the new QName instance.
Parameters:
qname - the QName from which this QName will be constructed.
Creates a QName object with a uri from a Namespace object and
a localName from a QName object. If either argument is not
the expected data type, the argument is converted to a string
and assigned to the corresponding property of the new QName object.
Parameters:
uri - a Namespace object from which to copy the uri value. An argument of any other type is converted to a string.
localName - a QName object from which to copy the localName value. An argument of any other type is converted to a string.
Returns a string composed of the URI, and the local name for the QName
object, separated by "::". The format depends on the uri property of
the QName object:
If uri == ""
toString returns localName
else if uri == null
toString returns *::localName
else
toString returns uri::localNam
Returns:
a string composed of the URI, and the local name for the QName
object, separated by "::".