oracle.xml.util

## Class QxName

- java.lang.Object
- - javax.xml.namespace.QName
  - - oracle.xml.util.QxName

All Implemented Interfaces:
  java.io.Serializable

    public class QxName
    extends javax.xml.namespace.QName

This class represents the XML Name used in DOM/XSLT and other modules. It consists of Prefix, LocalName, and Namespace and optional QName. The class is immutable.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`QxName(java.lang.String namespace, java.lang.String localname)` Constructor - a QxName class based on prefix, localname, and namespace The prefix and qname are set to null.
`QxName(java.lang.String namespace, java.lang.String localname, java.lang.String prefix, java.lang.String qname)` Constructor - a QxName class based on qname and namespace The prefix and qname are optional.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(java.lang.String ns, java.lang.String lname)` Check if the QxName is equal in localname and namespace
`java.lang.String` `getPrefix()` Get the prefix
`java.lang.String` `getQName()` Get the qname
`QxName` `setPrefix(java.lang.String prefix)` Set the prefix

### Methods inherited from class javax.xml.namespace.QName

`equals, getLocalPart, getNamespaceURI, hashCode, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### QxName

    public QxName(java.lang.String namespace,
                  java.lang.String localname)

Constructor - a QxName class based on prefix, localname, and namespace The prefix and qname are set to null. If either namespace or localname is null, then throw a NullPointerException.

Parameters:
  `namespace` - - namespace of QxName
  `localname` - - localname of QxName

#### QxName

    public QxName(java.lang.String namespace,
                  java.lang.String localname,
                  java.lang.String prefix,
                  java.lang.String qname)

Constructor - a QxName class based on qname and namespace The prefix and qname are optional. If any argument is null, then throw a NullPointerException.

Parameters:
  `namespace` - - namespace of QxName
  `localname` - - localname of QxName
  `prefix` - - prefix of QxName
  `qname` - - qname of QxName

### Method Detail

#### getPrefix

    public java.lang.String getPrefix()

Get the prefix

Returns:
  - the prefix of QxName

#### setPrefix

    public QxName setPrefix(java.lang.String prefix)

Set the prefix

Returns:
  - the new QxName

#### getQName

    public java.lang.String getQName()

Get the qname

Returns:
  - the qname of QxName

#### equals

    public boolean equals(java.lang.String ns,
                          java.lang.String lname)

Check if the QxName is equal in localname and namespace

Parameters:
  `ns` - Namespace being compared
  `lname` - Localname being compared
Returns:
  true if equal, else false.

Copyright © 2003, 2017, Oracle and/or its affiliates. All rights reserved.