Class DomTripNavigator
java.lang.Object
org.jaxen.DefaultNavigator
eu.maveniverse.domtrip.jaxen.DomTripNavigator
- All Implemented Interfaces:
Serializable, org.jaxen.Navigator
public class DomTripNavigator
extends org.jaxen.DefaultNavigator
Jaxen
Navigator implementation for the DomTrip XML object model.
This navigator enables full XPath 1.0 evaluation against DomTrip's lossless
XML tree. It maps DomTrip's node types (Element, Text,
Comment, ProcessingInstruction, Document) to Jaxen's
expected navigation model.
Since DomTrip's Attribute class does not extend Node and does
not store a parent reference, this navigator uses AttributeNode wrappers
on the attribute axis. Similarly, NamespaceNode wrappers represent
namespace declarations on the namespace axis.
Usage:
Navigator nav = DomTripNavigator.getInstance();
DomTripXPath xpath = new DomTripXPath("//dependency[@scope='test']");
List results = xpath.selectNodes(root);
- Since:
- 1.3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeAxisIterator(Object contextNode) getAttributeName(Object attr) getAttributeQName(Object attr) getChildAxisIterator(Object contextNode) getCommentStringValue(Object comment) getDocument(String uri) getDocumentNode(Object contextNode) getElementById(Object contextNode, String elementId) getElementName(Object element) getElementNamespaceUri(Object element) getElementQName(Object element) getElementStringValue(Object element) getFollowingSiblingAxisIterator(Object contextNode) static org.jaxen.NavigatorReturns the singleton navigator instance.getNamespaceAxisIterator(Object contextNode) getParentAxisIterator(Object contextNode) getParentNode(Object contextNode) getPrecedingSiblingAxisIterator(Object contextNode) getTextStringValue(Object text) booleanisAttribute(Object object) booleanbooleanisDocument(Object object) booleanbooleanisNamespace(Object object) booleanisProcessingInstruction(Object object) booleanorg.jaxen.XPathparseXPath(String xpath) translateNamespacePrefixToUri(String prefix, Object context) Methods inherited from class org.jaxen.DefaultNavigator
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getFollowingAxisIterator, getNodeType, getPrecedingAxisIterator, getSelfAxisIterator
-
Constructor Details
-
DomTripNavigator
public DomTripNavigator()
-
-
Method Details
-
getInstance
public static org.jaxen.Navigator getInstance()Returns the singleton navigator instance.- Returns:
- the shared
DomTripNavigator
-
getChildAxisIterator
-
getParentAxisIterator
-
getParentNode
-
getFollowingSiblingAxisIterator
-
getPrecedingSiblingAxisIterator
-
getAttributeAxisIterator
-
getNamespaceAxisIterator
-
getDocumentNode
-
isDocument
-
isElement
-
isAttribute
-
isText
-
isComment
-
isProcessingInstruction
-
isNamespace
-
getElementName
-
getElementQName
-
getElementNamespaceUri
-
getElementStringValue
-
getAttributeName
-
getAttributeQName
-
getAttributeNamespaceUri
-
getAttributeStringValue
-
getTextStringValue
-
getCommentStringValue
-
getProcessingInstructionTarget
-
getProcessingInstructionData
-
getNamespacePrefix
-
getNamespaceStringValue
-
translateNamespacePrefixToUri
-
parseXPath
- Throws:
org.jaxen.saxpath.SAXPathException
-
getDocument
-
getElementById
-