Class Axis
java.lang.Object
org.jaxen.saxpath.Axis
Internal SAXPath class that contains constants representing
XPath operators to avoid a lot of string comparisons.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intTheancestoraxisstatic final intTheancestor-or-selfaxisstatic final intTheattributeaxisstatic final intThechildaxisstatic final intThedescendantaxisstatic final intThedescendant-or-selfaxisstatic final intThefollowingaxisstatic final intThefollowing-siblingaxisstatic final intMarker for an invalid axisstatic final intThenamespaceaxisstatic final intTheparentaxisstatic final intTheprecedingaxisstatic final intThepreceding-siblingaxisstatic final intTheselfaxis -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INVALID_AXIS
public static final int INVALID_AXISMarker for an invalid axis- See Also:
-
CHILD
public static final int CHILDThechildaxis- See Also:
-
DESCENDANT
public static final int DESCENDANTThedescendantaxis- See Also:
-
PARENT
public static final int PARENTTheparentaxis- See Also:
-
ANCESTOR
public static final int ANCESTORTheancestoraxis- See Also:
-
FOLLOWING_SIBLING
public static final int FOLLOWING_SIBLINGThefollowing-siblingaxis- See Also:
-
PRECEDING_SIBLING
public static final int PRECEDING_SIBLINGThepreceding-siblingaxis- See Also:
-
FOLLOWING
public static final int FOLLOWINGThefollowingaxis- See Also:
-
PRECEDING
public static final int PRECEDINGTheprecedingaxis- See Also:
-
ATTRIBUTE
public static final int ATTRIBUTETheattributeaxis- See Also:
-
NAMESPACE
public static final int NAMESPACEThenamespaceaxis- See Also:
-
SELF
public static final int SELFTheselfaxis- See Also:
-
DESCENDANT_OR_SELF
public static final int DESCENDANT_OR_SELFThedescendant-or-selfaxis- See Also:
-
ANCESTOR_OR_SELF
public static final int ANCESTOR_OR_SELFTheancestor-or-selfaxis- See Also:
-
-
Constructor Details
-
Axis
private Axis()
-
-
Method Details
-
lookup
Returns the name of the axis.
- Parameters:
axisNum- the axis code- Returns:
- the name of the axis such as might be used in an XPath expression
- Throws:
JaxenRuntimeException- if the number does not represent one of the 13 XPath axes
-
lookup
Returns the code for an axis given its name.
- Parameters:
axisName- the name of the axis: child, parent, descendant, descendant-or-self, etc.- Returns:
- the axis code
-