Package org.jaxen.saxpath
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 int
Theancestor
axisstatic final int
Theancestor-or-self
axisstatic final int
Theattribute
axisstatic final int
Thechild
axisstatic final int
Thedescendant
axisstatic final int
Thedescendant-or-self
axisstatic final int
Thefollowing
axisstatic final int
Thefollowing-sibling
axisstatic final int
Marker for an invalid axisstatic final int
Thenamespace
axisstatic final int
Theparent
axisstatic final int
Thepreceding
axisstatic final int
Thepreceding-sibling
axisstatic final int
Theself
axis -
Method Summary
-
Field Details
-
INVALID_AXIS
public static final int INVALID_AXISMarker for an invalid axis- See Also:
-
CHILD
public static final int CHILDThechild
axis- See Also:
-
DESCENDANT
public static final int DESCENDANTThedescendant
axis- See Also:
-
PARENT
public static final int PARENTTheparent
axis- See Also:
-
ANCESTOR
public static final int ANCESTORTheancestor
axis- See Also:
-
FOLLOWING_SIBLING
public static final int FOLLOWING_SIBLINGThefollowing-sibling
axis- See Also:
-
PRECEDING_SIBLING
public static final int PRECEDING_SIBLINGThepreceding-sibling
axis- See Also:
-
FOLLOWING
public static final int FOLLOWINGThefollowing
axis- See Also:
-
PRECEDING
public static final int PRECEDINGThepreceding
axis- See Also:
-
ATTRIBUTE
public static final int ATTRIBUTETheattribute
axis- See Also:
-
NAMESPACE
public static final int NAMESPACEThenamespace
axis- See Also:
-
SELF
public static final int SELFTheself
axis- See Also:
-
DESCENDANT_OR_SELF
public static final int DESCENDANT_OR_SELFThedescendant-or-self
axis- See Also:
-
ANCESTOR_OR_SELF
public static final int ANCESTOR_OR_SELFTheancestor-or-self
axis- See Also:
-
-
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
-