Module java.xml

Class QName

java.lang.Object
javax.xml.namespace.QName
All Implemented Interfaces:
Serializable

public class QName extends Object implements Serializable

QName represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML.

The value of a QName contains a Namespace URI, local part and prefix.

The prefix is included in QName to retain lexical information when present in an XML input source. The prefix is NOT used in QName.equals(Object) or to compute the QName.hashCode(). Equality and the hash code are defined using only the Namespace URI and local part.

If not specified, the Namespace URI is set to XMLConstants.NULL_NS_URI. If not specified, the prefix is set to XMLConstants.DEFAULT_NS_PREFIX.

QName is immutable.

Since:
1.5
See Also: