commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <si...@ecnetwork.co.nz>
Subject [digester] further usage examples
Date Mon, 22 Sep 2003 00:28:14 GMT
Hi,

When I posted my original example of digester usage (now checked in as
"digester/src/examples/api/addressbook") I promised more.

Well, attached is a proposed follow-on example entitled "Catalog"
(library catalog), that demonstrates:

* how to use Digester.getRoot() to retrieve the "root" object
  created when parsing an input file.
* how to use the "factory create" rule to create java objects which
  do not have default (no-argument) constructors.
* how to use ExtendedBaseRules to get trailing-wildcard support
* how to use the BeanPropertySetterRule
* how to use the "set properties" rule (advanced usage) to map xml
  attributes to java bean properties with names different from the
  xml attribute name.
* how to use the SetPropertyRule.
* how to use the ObjectParamRule to pass a constant string to a method.

If this is acceptable, I would suggest checking all this in as:
  digester/src/examples/api/catalog

Regards,

Simon

Mime
View raw message