Class Axis

java.lang.Object
org.jaxen.saxpath.Axis

public class Axis extends Object
Internal SAXPath class that contains constants representing XPath operators to avoid a lot of string comparisons.
  • Field Details

  • Constructor Details

    • Axis

      private Axis()
  • Method Details

    • lookup

      public static 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(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