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 Stx model.
010     *
011     * <p>This is the main entry point for matching an XPath against an Stx
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 stxElement = ...;
018     * XPath path = new JDOMXPath("a/b/c");
019     * List results = path.selectNodes(stxElement);
020     * </pre>
021     *
022     * @see BaseXPath
023     *
024     * @author <a href="mailto:thor@peersoft.de">Thor Kristmundsson</a>
025     *
026     */
027    public class PairXPath 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 PairXPath(String xpathExpr) throws JaxenException
037        {
038            super( xpathExpr, PairNavigator.getInstance() );
039        }
040    }