public class

QName

extends Object
implements Cloneable
java.lang.Object
   ↳ org.apache.xerces.xni.QName

Class Overview

A structure that holds the components of an XML Namespaces qualified name.

To be used correctly, the strings must be identical references for equal strings. Within the parser, these values are considered symbols and should always be retrieved from the SymbolTable.

Summary

Fields
public String localpart The qname localpart.
public String prefix The qname prefix.
public String rawname The qname rawname.
public String uri The URI to which the qname prefix is bound.
Public Constructors
QName()
Default constructor.
QName(String prefix, String localpart, String rawname, String uri)
Constructs a QName with the specified values.
QName(QName qname)
Constructs a copy of the specified QName.
Public Methods
void clear()
Clears the values of the qname components.
Object clone()
Returns a clone of this object.
boolean equals(Object object)
Returns true if the two objects are equal.
int hashCode()
Returns the hashcode for this object.
void setValues(String prefix, String localpart, String rawname, String uri)
Convenience method to set the values of the qname components.
void setValues(QName qname)
Convenience method to set the values of the qname components.
String toString()
Returns a string representation of this object.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public String localpart

The qname localpart. For example, the localpart for the qname "a:foo" is "foo".

public String prefix

The qname prefix. For example, the prefix for the qname "a:foo" is "a".

public String rawname

The qname rawname. For example, the rawname for the qname "a:foo" is "a:foo".

public String uri

The URI to which the qname prefix is bound. This binding must be performed by a XML Namespaces aware processor.

Public Constructors

public QName ()

Default constructor.

public QName (String prefix, String localpart, String rawname, String uri)

Constructs a QName with the specified values.

public QName (QName qname)

Constructs a copy of the specified QName.

Public Methods

public void clear ()

Clears the values of the qname components.

public Object clone ()

Returns a clone of this object.

public boolean equals (Object object)

Returns true if the two objects are equal.

public int hashCode ()

Returns the hashcode for this object.

public void setValues (String prefix, String localpart, String rawname, String uri)

Convenience method to set the values of the qname components.

Parameters
prefix The qname prefix. (e.g. "a")
localpart The qname localpart. (e.g. "foo")
rawname The qname rawname. (e.g. "a:foo")
uri The URI binding. (e.g. "http://foo.com/mybinding")

public void setValues (QName qname)

Convenience method to set the values of the qname components.

Parameters
qname The qualified name to be copied.

public String toString ()

Returns a string representation of this object.