/** Constructor */ public JaxenHandler() { this.stack = new LinkedList(); this.xpathFactory = new DefaultXPathFactory(); }
public Step createTextNodeStep( int axis ) throws JaxenException { IterableAxis iter = getIterableAxis( axis ); return new DefaultTextNodeStep( iter, createPredicateSet() ); }
public FilterExpr createFilterExpr( Expr expr ) throws JaxenException { return new DefaultFilterExpr( expr, createPredicateSet() ); }
public Step createCommentNodeStep( int axis ) throws JaxenException { IterableAxis iter = getIterableAxis( axis ); return new DefaultCommentNodeStep( iter, createPredicateSet() ); }
final XPathFactory xpathFactory = new DefaultXPathFactory();
public Step createNameStep( int axis, String prefix, String localName ) throws JaxenException { IterableAxis iter = getIterableAxis( axis ); return new DefaultNameStep( iter, prefix, localName, createPredicateSet() ); }
public static Pattern parse(String text) throws JaxenException, org.jaxen.saxpath.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(); } }
public Step createAllNodeStep( int axis ) throws JaxenException { IterableAxis iter = getIterableAxis( axis ); return new DefaultAllNodeStep( iter, createPredicateSet() ); }
final XPathFactory xpathFactory = new DefaultXPathFactory();
public Step createProcessingInstructionNodeStep( int axis, String piName ) throws JaxenException { IterableAxis iter = getIterableAxis( axis ); return new DefaultProcessingInstructionNodeStep( iter, piName, createPredicateSet() ); }