commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: [DIGESTER] is it possible to get xpath
Date Mon, 28 Jul 2003 23:42:15 GMT
On Tue, 2003-07-29 at 10:36, robert burrell donkin wrote:
> On Monday, July 28, 2003, at 11:50 AM, Pavel Lisovin wrote:
> > To everyone,
> >
> > I am trying to parse XML file to get custom objects using digester-rules 
> > xml
> > file
> > and wondering if there is an easy way to get XPath or match pattern when
> > custom method is invoked.
> >
> > any ideas?
> i think that the easiest way to achieve this would be to create a custom 
> Rule implementation. this would be based on the SetNextRule but would push 
> the value of digester.getMatch onto the parameter stack.
> if you do go down this road and feel like contributing your Rule back to 
> the Apache Software Foundation then that'd be cool.
> - robert

There is an ObjectParamRule, which allows arbitrary objects (including
strings) to be passed to the target of a CallMethodRule. I don't know
whether this is accessable via xmlrules, but if it is, it might do what
you want. It can't pass "the current match pattern", but you could pass
a literal "main/log" for example.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message