Package org.dom4j

Class QName

java.lang.Object
org.dom4j.QName
All Implemented Interfaces:
Serializable

public class QName extends Object implements Serializable
QName represents a qualified name value of an XML element or attribute. It consists of a local name and a Namespaceinstance. This object is immutable.
Author:
James Strachan , Filip Jirsák
See Also:
  • Constructor Details

  • Method Details

    • get

      public static QName get(String name)
    • get

      public static QName get(String name, Namespace namespace)
    • get

      public static QName get(String name, String prefix, String uri)
    • get

      public static QName get(String qualifiedName, String uri)
    • get

      public static QName get(String localName, Namespace namespace, String qualifiedName)
    • getName

      public String getName()
      DOCUMENT ME!
      Returns:
      the local name
    • getQualifiedName

      public String getQualifiedName()
      DOCUMENT ME!
      Returns:
      the qualified name in the format prefix:localName
    • getNamespace

      public Namespace getNamespace()
      DOCUMENT ME!
      Returns:
      the namespace of this QName
    • getNamespacePrefix

      public String getNamespacePrefix()
      DOCUMENT ME!
      Returns:
      the namespace URI of this QName
    • getNamespaceURI

      public String getNamespaceURI()
      DOCUMENT ME!
      Returns:
      the namespace URI of this QName
    • hashCode

      public int hashCode()
      DOCUMENT ME!
      Overrides:
      hashCode in class Object
      Returns:
      the hash code based on the qualified name and the URI of the namespace.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDocumentFactory

      public DocumentFactory getDocumentFactory()
      DOCUMENT ME!
      Returns:
      the factory that should be used for Elements of this QName
    • setDocumentFactory

      public void setDocumentFactory(DocumentFactory documentFactory)
    • validateNCName

      protected static void validateNCName(String ncname)