001    package com.saelist.stx.xpath;
002    
003    import org.jaxen.JaxenException;
004    
005    import org.jaxen.BaseXPath;
006    import org.jaxen.Navigator;
007    import org.jaxen.XPath;
008    
009    /** An XPath implementation for the File model.
010     *
011     * <p>This is the main entry point for matching an XPath against an File
012     * tree.  You create a compiled XPath object, then match it against
013     * one or more context nodes using the {@link #selectNodes}
014     * method, as in the following example:</p>
015     *
016     * <pre>
017     * Object File = ...;
018     * XPath path = new FileXPath("a/b/c");
019     * List results = path.selectNodes(File);
020     * </pre>
021     *
022     * @see BaseXPath
023     *
024     * @author <a href="mailto:thor@saelist.com">Thor Kristmundsson</a>
025     *
026     */
027    public class FileXPath extends BaseXPath
028    {
029      /** Construct given an XPath expression string.
030       *
031       *  @param xpathExpr The XPath expression.
032       *
033       *  @throws JaxenException if there is a syntax error while
034       *          parsing the expression.
035       */
036      public FileXPath(String xpathExpr) throws JaxenException
037      {
038        super( xpathExpr, FileNavigator.getInstance() );
039      }
040    }