Class QName

    • Constructor Detail

      • QName

        public QName​(String localName)
        Creates a QName without prefix (e.g. with the default prefix : "").
        Parameters:
        localName - the local name
      • QName

        public QName​(String localName,
                     String prefix)
        Creates a QName having the given local name and prefix.
    • Method Detail

      • getLocalName

        public final String getLocalName()
      • getPrefixedName

        public final String getPrefixedName()
      • getPrefix

        public final String getPrefix()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • valueOf

        public static QName valueOf​(String name)
        Parses the given name and creates the corresponding QName.

        If the given name is not prefixed then the default prefix (e.g. "") will be used (i.e. the name will remain unprefixed).

        Parameters:
        name - the name in the prefixed form
        Returns:
        the qname
      • valueOf

        public static QName valueOf​(String name,
                                    String prefix)
        Parses the given name and create the corresponding QName.

        If the given name is not prefixed then the given prefix will be used.