|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.DefaultNavigator
org.jaxen.dom.DocumentNavigator
org.jaxen.dom.html.DocumentNavigator
Interface for navigating around the W3C HTML DOM object model.
This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.
XML is case-sensitive. HTML is not. This navigator is an extension of the DOM DocumentNavigator that automatically changes all element, but not attribute, names to lowercase or uppercase to aid in navigating through HTML documents. Note that case modification are bypassed for XHTML documents. XHTML is case sensitive and can be expected to store all elements and attributes in lower case. Also note that HTML attribute names are stored as lower case in the HTML (and XHTML) DOM already which is why the case of attribute names are not modified.
XPath
,
DOMXPath
,
NamespaceNode
,
Serialized FormConstructor Summary | |
DocumentNavigator()
Constructs a new DocumentNavigator that will convert to lowercase. |
|
DocumentNavigator(boolean toLowerCase)
Constructs a new DocumentNavigator that will convert to lowercase. |
Method Summary | |
java.lang.String |
getElementName(java.lang.Object object)
Get the local name of an element. |
java.lang.String |
getElementQName(java.lang.Object object)
Get the qualified name of an element. |
protected java.lang.String |
getHTMLNodeName(org.w3c.dom.Node node,
java.lang.String name)
Get the name of the node in the case specified for the current object |
static Navigator |
getInstance(boolean toLowerCase)
Get a singleton DocumentNavigator for efficiency. |
boolean |
isToLowerCase()
Returns true if the navigator is converting to lowercase. |
XPath |
parseXPath(java.lang.String xpath)
Returns a parsed form of the given xpath string, which will be suitable for queries on HTML DOM documents. |
Methods inherited from class org.jaxen.DefaultNavigator |
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getNodeType, getParentNode, getPrecedingAxisIterator, getSelfAxisIterator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DocumentNavigator()
public DocumentNavigator(boolean toLowerCase)
toLowerCase
- whether to convert all names to lowercaseMethod Detail |
public boolean isToLowerCase()
true
if the navigator is converting to lowercase.
public static Navigator getInstance(boolean toLowerCase)
public XPath parseXPath(java.lang.String xpath) throws SAXPathException
parseXPath
in interface Navigator
parseXPath
in class DocumentNavigator
SAXPathException
protected java.lang.String getHTMLNodeName(org.w3c.dom.Node node, java.lang.String name)
node
- the target node. Used to avoid case modification of node
names in XML documents.name
- the name of the node, presumably in the case natively
stored by the DOM
public java.lang.String getElementName(java.lang.Object object)
DocumentNavigator
getElementName
in interface Navigator
getElementName
in class DocumentNavigator
object
- the target node
public java.lang.String getElementQName(java.lang.Object object)
DocumentNavigator
getElementQName
in interface Navigator
getElementQName
in class DocumentNavigator
object
- the target node
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |