public class DocumentNavigator
extends org.jaxen.DefaultNavigator
This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.
HtmlUnitXPath
,
Serialized FormModifier and Type | Field and Description |
---|---|
static DocumentNavigator |
instance
Constant: singleton navigator.
|
Constructor and Description |
---|
DocumentNavigator() |
Modifier and Type | Method and Description |
---|---|
Iterator |
getAttributeAxisIterator(Object contextNode)
Get an iterator over all attributes.
|
String |
getAttributeName(Object object)
Get the local name of an attribute.
|
String |
getAttributeNamespaceUri(Object object) |
String |
getAttributeQName(Object object)
Get the qualified name of an attribute.
|
String |
getAttributeStringValue(Object object)
Get the string value of an attribute node.
|
Iterator |
getChildAxisIterator(Object contextNode)
Get an iterator over all of this node's children.
|
String |
getCommentStringValue(Object object)
Get the string value of a comment node.
|
Object |
getDocumentNode(Object contextNode)
Get the top-level document node.
|
Object |
getElementById(Object contextNode,
String elementId)
Returns the element whose ID is given by elementId.
|
String |
getElementName(Object object)
Get the local name of an element.
|
String |
getElementNamespaceUri(Object element)
Retrieve the namespace URI of the given element node.
|
String |
getElementQName(Object object)
Get the qualified name of an element.
|
String |
getElementStringValue(Object object)
Get the string value of an element node.
|
Iterator |
getFollowingAxisIterator(Object contextNode)
Get an iterator over all following nodes, depth-first.
|
Iterator |
getFollowingSiblingAxisIterator(Object contextNode)
Get an iterator over all following siblings.
|
String |
getNamespacePrefix(Object object)
Get the prefix value of a Namespace node.
|
String |
getNamespaceStringValue(Object object)
Get the string value of a Namespace node.
|
Iterator |
getParentAxisIterator(Object contextNode)
Get a (single-member) iterator over this node's parent.
|
Iterator |
getPrecedingAxisIterator(Object contextNode)
Get an iterator over all preceding nodes, depth-first.
|
Iterator |
getPrecedingSiblingAxisIterator(Object contextNode)
Get an iterator over all preceding siblings.
|
String |
getTextStringValue(Object object)
Get the string value of text.
|
boolean |
isAttribute(Object object)
Test if a node is an attribute.
|
boolean |
isComment(Object object)
Test if a node is a comment.
|
boolean |
isDocument(Object object)
Test if a node is a top-level document.
|
boolean |
isElement(Object object)
Test if a node is an element.
|
boolean |
isNamespace(Object object)
Test if a node is a Namespace.
|
boolean |
isProcessingInstruction(Object object)
Test if a node is a processing instruction.
|
boolean |
isText(Object object)
Test if a node is plain text.
|
org.jaxen.XPath |
parseXPath(String xpath) |
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getDocument, getNamespaceAxisIterator, getNodeType, getParentNode, getProcessingInstructionData, getProcessingInstructionTarget, getSelfAxisIterator, translateNamespacePrefixToUri
public static final DocumentNavigator instance
public Iterator getChildAxisIterator(Object contextNode)
getChildAxisIterator
in interface org.jaxen.Navigator
getChildAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the child axis.public Iterator getParentAxisIterator(Object contextNode)
getParentAxisIterator
in interface org.jaxen.Navigator
getParentAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- the context node for the parent axis.public Iterator getFollowingSiblingAxisIterator(Object contextNode)
getFollowingSiblingAxisIterator
in interface org.jaxen.Navigator
getFollowingSiblingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- the context node for the sibling iterator.public Iterator getPrecedingSiblingAxisIterator(Object contextNode)
getPrecedingSiblingAxisIterator
in interface org.jaxen.Navigator
getPrecedingSiblingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the preceding sibling axis.public Iterator getFollowingAxisIterator(Object contextNode)
getFollowingAxisIterator
in interface org.jaxen.Navigator
getFollowingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the following axis.public Iterator getPrecedingAxisIterator(Object contextNode)
getPrecedingAxisIterator
in interface org.jaxen.Navigator
getPrecedingAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the preceding axis.public Iterator getAttributeAxisIterator(Object contextNode)
getAttributeAxisIterator
in interface org.jaxen.Navigator
getAttributeAxisIterator
in class org.jaxen.DefaultNavigator
contextNode
- The context node for the attribute axis.public org.jaxen.XPath parseXPath(String xpath) throws org.jaxen.JaxenException
xpath
- an xpath expressionorg.jaxen.JaxenException
- if the expression could not be parsedpublic Object getDocumentNode(Object contextNode)
getDocumentNode
in interface org.jaxen.Navigator
getDocumentNode
in class org.jaxen.DefaultNavigator
contextNode
- Any node in the document.public String getElementNamespaceUri(Object element)
element
- the context element nodepublic String getElementName(Object object)
object
- The target node.public String getElementQName(Object object)
object
- The target node.public String getAttributeNamespaceUri(Object object)
object
- The target node.public String getAttributeName(Object object)
object
- The target node.public String getAttributeQName(Object object)
object
- The target node.public boolean isDocument(Object object)
object
- The target node.public boolean isNamespace(Object object)
object
- The target node.public boolean isElement(Object object)
object
- The target node.public boolean isAttribute(Object object)
object
- The target node.public boolean isComment(Object object)
object
- The target node.public boolean isText(Object object)
object
- The target node.public boolean isProcessingInstruction(Object object)
object
- The target node.public String getElementStringValue(Object object)
object
- The target node.public String getAttributeStringValue(Object object)
object
- The target node.public String getTextStringValue(Object object)
object
- The target node.public String getCommentStringValue(Object object)
object
- The target node.public String getNamespaceStringValue(Object object)
object
- The target node.public String getNamespacePrefix(Object object)
object
- The target node.public Object getElementById(Object contextNode, 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 forDocumentBuilderFactory
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.