Package org.jaxen.saxpath
Class Axis
- java.lang.Object
-
- org.jaxen.saxpath.Axis
-
public class Axis extends java.lang.ObjectInternal SAXPath class that contains constants representing XPath operators to avoid a lot of string comparisons.
-
-
Field Summary
Fields Modifier and Type Field Description static intANCESTORTheancestoraxisstatic intANCESTOR_OR_SELFTheancestor-or-selfaxisstatic intATTRIBUTETheattributeaxisstatic intCHILDThechildaxisstatic intDESCENDANTThedescendantaxisstatic intDESCENDANT_OR_SELFThedescendant-or-selfaxisstatic intFOLLOWINGThefollowingaxisstatic intFOLLOWING_SIBLINGThefollowing-siblingaxisstatic intINVALID_AXISMarker for an invalid axisstatic intNAMESPACEThenamespaceaxisstatic intPARENTTheparentaxisstatic intPRECEDINGTheprecedingaxisstatic intPRECEDING_SIBLINGThepreceding-siblingaxisstatic intSELFTheselfaxis
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringlookup(int axisNum)Returns the name of the axis.static intlookup(java.lang.String axisName)Returns the code for an axis given its name.
-
-
-
Field Detail
-
INVALID_AXIS
public static final int INVALID_AXIS
Marker for an invalid axis- See Also:
- Constant Field Values
-
CHILD
public static final int CHILD
Thechildaxis- See Also:
- Constant Field Values
-
DESCENDANT
public static final int DESCENDANT
Thedescendantaxis- See Also:
- Constant Field Values
-
PARENT
public static final int PARENT
Theparentaxis- See Also:
- Constant Field Values
-
ANCESTOR
public static final int ANCESTOR
Theancestoraxis- See Also:
- Constant Field Values
-
FOLLOWING_SIBLING
public static final int FOLLOWING_SIBLING
Thefollowing-siblingaxis- See Also:
- Constant Field Values
-
PRECEDING_SIBLING
public static final int PRECEDING_SIBLING
Thepreceding-siblingaxis- See Also:
- Constant Field Values
-
FOLLOWING
public static final int FOLLOWING
Thefollowingaxis- See Also:
- Constant Field Values
-
PRECEDING
public static final int PRECEDING
Theprecedingaxis- See Also:
- Constant Field Values
-
ATTRIBUTE
public static final int ATTRIBUTE
Theattributeaxis- See Also:
- Constant Field Values
-
NAMESPACE
public static final int NAMESPACE
Thenamespaceaxis- See Also:
- Constant Field Values
-
SELF
public static final int SELF
Theselfaxis- See Also:
- Constant Field Values
-
DESCENDANT_OR_SELF
public static final int DESCENDANT_OR_SELF
Thedescendant-or-selfaxis- See Also:
- Constant Field Values
-
ANCESTOR_OR_SELF
public static final int ANCESTOR_OR_SELF
Theancestor-or-selfaxis- See Also:
- Constant Field Values
-
-
Method Detail
-
lookup
public static java.lang.String lookup(int axisNum)
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
public static int lookup(java.lang.String axisName)
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
-
-