|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.DefaultNavigator
com.gargoylesoftware.htmlunit.html.xpath.DocumentNavigator
public class DocumentNavigator
Jaxen Navigator implementation for navigating around the HtmlUnit DOM object model in the context of XPath evaluation. The implementation is closely modeled after the W3C DOM Navigator that comes with Jaxen.
This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.
HtmlUnitXPath
,
Serialized FormField Summary | |
---|---|
static DocumentNavigator |
instance
Constant: singleton navigator. |
Constructor Summary | |
---|---|
DocumentNavigator()
|
Method Summary | |
---|---|
java.util.Iterator |
getAttributeAxisIterator(java.lang.Object contextNode)
Get an iterator over all attributes. |
java.lang.String |
getAttributeName(java.lang.Object object)
Get the local name of an attribute. |
java.lang.String |
getAttributeNamespaceUri(java.lang.Object object)
|
java.lang.String |
getAttributeQName(java.lang.Object object)
Get the qualified name of an attribute. |
java.lang.String |
getAttributeStringValue(java.lang.Object object)
Get the string value of an attribute node. |
java.util.Iterator |
getChildAxisIterator(java.lang.Object contextNode)
Get an iterator over all of this node's children. |
java.lang.String |
getCommentStringValue(java.lang.Object object)
Get the string value of a comment node. |
java.lang.Object |
getDocumentNode(java.lang.Object contextNode)
Get the top-level document node. |
java.lang.Object |
getElementById(java.lang.Object contextNode,
java.lang.String elementId)
Returns the element whose ID is given by elementId. |
java.lang.String |
getElementName(java.lang.Object object)
Get the local name of an element. |
java.lang.String |
getElementNamespaceUri(java.lang.Object object)
Get the Namespace URI of an element. |
java.lang.String |
getElementQName(java.lang.Object object)
Get the qualified name of an element. |
java.lang.String |
getElementStringValue(java.lang.Object object)
Get the string value of an element node. |
java.util.Iterator |
getFollowingAxisIterator(java.lang.Object contextNode)
Get an iterator over all following nodes, depth-first. |
java.util.Iterator |
getFollowingSiblingAxisIterator(java.lang.Object contextNode)
Get an iterator over all following siblings. |
java.lang.String |
getNamespacePrefix(java.lang.Object object)
Get the prefix value of a Namespace node. |
java.lang.String |
getNamespaceStringValue(java.lang.Object object)
Get the string value of a Namespace node. |
java.util.Iterator |
getParentAxisIterator(java.lang.Object contextNode)
Get a (single-member) iterator over this node's parent. |
java.util.Iterator |
getPrecedingAxisIterator(java.lang.Object contextNode)
Get an iterator over all preceding nodes, depth-first. |
java.util.Iterator |
getPrecedingSiblingAxisIterator(java.lang.Object contextNode)
Get an iterator over all preceding siblings. |
java.lang.String |
getTextStringValue(java.lang.Object object)
Get the string value of text. |
boolean |
isAttribute(java.lang.Object object)
Test if a node is an attribute. |
boolean |
isComment(java.lang.Object object)
Test if a node is a comment. |
boolean |
isDocument(java.lang.Object object)
Test if a node is a top-level document. |
boolean |
isElement(java.lang.Object object)
Test if a node is an element. |
boolean |
isNamespace(java.lang.Object object)
Test if a node is a Namespace. |
boolean |
isProcessingInstruction(java.lang.Object object)
Test if a node is a processing instruction. |
boolean |
isText(java.lang.Object object)
Test if a node is plain text. |
org.jaxen.XPath |
parseXPath(java.lang.String xpath)
|
Methods inherited from class org.jaxen.DefaultNavigator |
---|
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getDocument, getNamespaceAxisIterator, getNodeType, getParentNode, getProcessingInstructionData, getProcessingInstructionTarget, getSelfAxisIterator, translateNamespacePrefixToUri |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DocumentNavigator instance
Constructor Detail |
---|
public DocumentNavigator()
Method Detail |
---|
public java.util.Iterator getAttributeAxisIterator(java.lang.Object contextNode)
getAttributeAxisIterator
in interface org.jaxen.Navigator
getAttributeAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the attribute axis.
public java.lang.String getAttributeName(java.lang.Object object)
object
- The target node.
public java.lang.String getAttributeNamespaceUri(java.lang.Object object)
object
- The target node.
public java.lang.String getAttributeQName(java.lang.Object object)
object
- The target node.
public java.lang.String getAttributeStringValue(java.lang.Object object)
object
- The target node.
public java.util.Iterator getChildAxisIterator(java.lang.Object contextNode)
getChildAxisIterator
in interface org.jaxen.Navigator
getChildAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the child axis.
public java.lang.String getCommentStringValue(java.lang.Object object)
object
- The target node.
public java.lang.Object getDocumentNode(java.lang.Object contextNode)
getDocumentNode
in interface org.jaxen.Navigator
getDocumentNode
in class org.jaxen.DefaultNavigator
contextNode
- Any node in the document.
public java.lang.Object getElementById(java.lang.Object contextNode, java.lang.String elementId)
setValidating(true)
on the
DocumentBuilderFactory.
getElementById
in interface org.jaxen.Navigator
getElementById
in class org.jaxen.DefaultNavigator
contextNode
- a node from the document in which to look for the
idelementId
- id to look for
DocumentBuilderFactory
public java.lang.String getElementName(java.lang.Object object)
object
- The target node.
public java.lang.String getElementNamespaceUri(java.lang.Object object)
object
- The target node.
public java.lang.String getElementQName(java.lang.Object object)
object
- The target node.
public java.lang.String getElementStringValue(java.lang.Object object)
object
- The target node.
public java.util.Iterator getFollowingAxisIterator(java.lang.Object contextNode)
getFollowingAxisIterator
in interface org.jaxen.Navigator
getFollowingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the following axis.
public java.util.Iterator getFollowingSiblingAxisIterator(java.lang.Object contextNode)
getFollowingSiblingAxisIterator
in interface org.jaxen.Navigator
getFollowingSiblingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- the context node for the sibling iterator.
public java.lang.String getNamespacePrefix(java.lang.Object object)
object
- The target node.
public java.lang.String getNamespaceStringValue(java.lang.Object object)
object
- The target node.
public java.util.Iterator getParentAxisIterator(java.lang.Object contextNode)
getParentAxisIterator
in interface org.jaxen.Navigator
getParentAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- the context node for the parent axis.
public java.util.Iterator getPrecedingAxisIterator(java.lang.Object contextNode)
getPrecedingAxisIterator
in interface org.jaxen.Navigator
getPrecedingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the preceding axis.
public java.util.Iterator getPrecedingSiblingAxisIterator(java.lang.Object contextNode)
getPrecedingSiblingAxisIterator
in interface org.jaxen.Navigator
getPrecedingSiblingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the preceding sibling axis.
public java.lang.String getTextStringValue(java.lang.Object object)
object
- The target node.
public boolean isAttribute(java.lang.Object object)
object
- The target node.
public boolean isComment(java.lang.Object object)
object
- The target node.
public boolean isDocument(java.lang.Object object)
object
- The target node.
public boolean isElement(java.lang.Object object)
object
- The target node.
public boolean isNamespace(java.lang.Object object)
object
- The target node.
public boolean isProcessingInstruction(java.lang.Object object)
object
- The target node.
public boolean isText(java.lang.Object object)
object
- The target node.
public org.jaxen.XPath parseXPath(java.lang.String xpath) throws org.jaxen.JaxenException
xpath
- an xpath expression
org.jaxen.JaxenException
- if the expression could not be parsed
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |