Package org.saxpath

Examples of org.saxpath.XPathReader


   
    public static Pattern parse(String text) throws JaxenException, SAXPathException
    {
        if ( USE_HANDLER )
        {
            XPathReader reader = XPathReaderFactory.createReader();           
            PatternHandler handler = new PatternHandler();      
           
            handler.setXPathFactory( new DefaultXPathFactory() );           
            reader.setXPathHandler( handler );
            reader.parse( text );
           
            return handler.getPattern();
        }
        else
        {
            XPathReader reader = XPathReaderFactory.createReader();           
            JaxenHandler handler = new JaxenHandler();
           
            handler.setXPathFactory( new DefaultXPathFactory() );           
            reader.setXPathHandler( handler );
            reader.parse( text );

            Pattern pattern = convertExpr( handler.getXPathExpr().getRootExpr() );
            return pattern.simplify();
        }
    }
View Full Code Here


     */
    protected BaseXPath(String xpathExpr) throws JaxenException
    {
        try
        {
            XPathReader reader = XPathReaderFactory.createReader();
           
            JaxenHandler handler = new JaxenHandler();
           
            reader.setXPathHandler( handler );
           
            reader.parse( xpathExpr );

            this.xpath = handler.getXPathExpr();
        }
        catch (org.saxpath.XPathSyntaxException e)
        {
View Full Code Here

     *          interface.
     */
    public static XPathReader createReader(String className) throws SAXPathException
    {
        Class readerClass  = null;
        XPathReader reader = null;

        try
        {
            // Use the full version of Class.forName(), so as to
            // work better in sandboxed environments, such as
View Full Code Here

TOP

Related Classes of org.saxpath.XPathReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.