Hi all,

Would it be possible to include a vistor pattern in Jaxen? The Expr
interface would have to include a method visit as follows

public void visit(ExprVisitor visitor) throws JaxenException,

The interface ExprVisitor would be defined as follows:

public interface ExprVisitor{
    public ExprVisitor handle(PathExpr expr);
    publicExprVisitor handle(LiteralExpr expr);
    .......etc
}

This allows the expression tree to be used for different purposes e.g.
Implementing a particular visitor could print out the expression tree as
XML. Indeed there are many applications for this pattern and leaves Jaxen
open to extensions.
I can do the implementation if required!
Eddie


_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to