Class XPathUtil


  • public class XPathUtil
    extends Object
    Simple utility class showing how to use the XPathParser Created by aretter on 16/03/2016.
    • Constructor Detail

      • XPathUtil

        public XPathUtil()
    • Method Detail

      • main

        public static final void main​(String[] args)
      • parseXPath

        public static Expr parseXPath​(String xpath,
                                      PrintStream out,
                                      PrintStream err)
        Parses an XPath Expression and generates an AST
        Parameters:
        xpath - The XPath to parse
        out - Either a print stream for receiving a debug print of the NodeTree generated by the parser, or null otherwise
        err - Either a print stream for receiving errors that occurred during parsing or null otherwise
        Returns:
        An Expr which is the root of the generated AST