public final class QNameSupport extends Object
Modifier | Constructor and Description |
---|---|
private |
QNameSupport()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static QName |
constructQName(Element owningElement,
String qname)
Constructs a QName from a string (attribute or element content) value.
|
static QName |
constructQName(String namespaceURI,
String localName,
String prefix)
Constructs a QName.
|
static QName |
getNodeQName(Node domNode)
Gets the QName for the given DOM node.
|
static String |
qnameToContentString(QName qname)
Converts a QName into a string that can be used for attribute values or element content.
|
@Nonnull public static QName constructQName(@Nonnull Element owningElement, @Nonnull @NotEmpty String qname)
owningElement
- parent DOM element of the Node which contains the QName valueqname
- the QName string@Nonnull public static QName constructQName(@Nullable String namespaceURI, @Nonnull @NotEmpty String localName, @Nullable String prefix)
namespaceURI
- the namespace of the QNamelocalName
- the local name of the QNameprefix
- the prefix of the QName, may be null@Nullable public static QName getNodeQName(@Nullable Node domNode)
domNode
- the DOM nodeCopyright © 1999–2016. All rights reserved.