public final class QName extends Object
Both must not be null. Use NamespaceConstants.NO_NAMESPACE_URI to describe that no namespace is given.
Instances of this class are immutable and thread safe.
| Modifier and Type | Method and Description |
|---|---|
static QName |
create(String localName)
Creates a new
QName with no namespace URI. |
static QName |
create(String uri,
String localName)
Creates a new
QName. |
boolean |
equals(Object obj) |
String |
getLocalName()
Returns the local name.
|
String |
getUri()
Returns the namespace uri.
|
int |
hashCode() |
String |
toString()
Returns a
String representation of this qualified name with the following format: |
public static QName create(String localName)
QName with no namespace URI.
localName - the local namepublic static QName create(String uri, String localName)
QName.
Use NamespaceConstants.NO_NAMESPACE_URI for the argument uri if no namespace is
given.
uri - the namespace uri (not null)localName - the local namepublic String getLocalName()
public String getUri()
Copyright © 2014. All rights reserved.