public class PrefixResolverDefault extends Object implements PrefixResolver
| Constructor and Description |
|---|
PrefixResolverDefault(Node xpathExpressionContext)
Construct a PrefixResolverDefault object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getNamespaceForPrefix(String prefix)
Given a namespace, get the corresponding prefix.
|
String |
getNamespaceForPrefix(String prefix,
Node namespaceContext)
Given a namespace, get the corresponding prefix, based on the context node.
|
boolean |
handlesNullPrefixes() |
public PrefixResolverDefault(Node xpathExpressionContext)
xpathExpressionContext - The context from which XPath expression prefixes will be
resolved. Warning: This will not work correctly if xpathExpressionContext is an attribute
node.public String getNamespaceForPrefix(String prefix)
getNamespaceForPrefix in interface PrefixResolverprefix - The prefix to look up, which may be an empty string ("") for the default
Namespace.public String getNamespaceForPrefix(String prefix, Node namespaceContext)
getNamespaceForPrefix in interface PrefixResolverprefix - The prefix to look up, which may be an empty string ("") for the default
Namespace.namespaceContext - The node context from which to look up the URI.public boolean handlesNullPrefixes()
handlesNullPrefixes in interface PrefixResolverCopyright © 2022–2024 HtmlUnit. All rights reserved.