commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject RE: [Digester] Recursive nodes - One to many
Date Fri, 23 Jan 2004 04:49:00 GMT
On Fri, 2004-01-23 at 16:51, Veerasamy, Thirumalai (Cognizant) wrote:
> Hi simon,
>   I searched through google, couldn't find the usage of regex digester.

Each rule you add to the digester has an associated pattern. Example:

digester.addCreateObject( "some-kind-of-pattern", MyObject.class);

When processing an xml node in the input, the path to the node (eg
"contexts/context/year/id") is compared to the pattern. This is the way
that digester always works. If the pattern "matches" the path to the
current node, then the rule is executed. What "matches" means depends on
which Rules object you have configured the digester to use.

When using the RegexRules, the pattern associated with each rule is
treated as a standard "regular expression". 

For any more info, you will need to read the javadoc, read the
RegexRules source, and experiment a bit.

In the digester CVS repository you will find some examples of using the
Digester which may be useful. They don't show how to use RegexRules, but
should help you understand Digester in general.



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

View raw message