Package org.custommonkey.xmlunit
Class QualifiedName
java.lang.Object
org.custommonkey.xmlunit.QualifiedName
Since javax.xml.namespace.QName is not present prior to Java5, this
is XMLUnit's own abstraction.
-
Constructor Summary
ConstructorDescriptionQualifiedName
(String localName) QualifiedName without namespace URI.QualifiedName
(String namespaceUri, String localName) QualifiedName with potential namespace URI. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
toString()
Represents the QualifiedName as {NS-URI}LOCAL-NAME.static QualifiedName
Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.static QualifiedName
valueOf
(String value, NamespaceContext ctx) Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.
-
Constructor Details
-
QualifiedName
QualifiedName without namespace URI.- Parameters:
localName
- local name
-
QualifiedName
QualifiedName with potential namespace URI.- Parameters:
localName
- local namenamespaceUri
- optional namespace URI
-
-
Method Details
-
getNamespaceURI
- Returns:
- namespace URI
-
getLocalName
- Returns:
- local name
-
hashCode
public int hashCode() -
equals
-
valueOf
Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.When using the prefix-version the prefix must be defined inside the current NamespaceContext.
- Parameters:
value
- string to parse- Returns:
- parsed QualifiedName
- See Also:
-
toString
Represents the QualifiedName as {NS-URI}LOCAL-NAME.If the NS-URI is equal to NULL_NS_URI only the local name is returned.
-
valueOf
Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.When using the prefix-version the prefix must be defined inside the NamespaceContext given as argument.
- Parameters:
value
- string to parsectx
- namespace context which must not be null when the prefix form is used- Returns:
- parsed QualifiedName
-