commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simon <simon.kitch...@chello.at>
Subject Re: Digester API doubt
Date Wed, 21 Nov 2007 22:44:20 GMT

On Wed, 2007-11-21 at 08:21 -0800, akiraleon123 wrote:
> Hi All,
> Hopefully this should be an easier one.
> I am using digester rules in the form of an xml file. Also, i have an
> xmlfilter that i need to feed into the digester. So, i need to have an API
> that accommodates both the URL for rules and the xml filter.
> There is no setter for xmlreader/filter or to the URL on Digester. I 'd
> appreciate if you can let me know of a way.

When using the plain Digester java API, this can be done easily.

As I mentioned earlier, Digester is just a SAX event handler. You can
create a parser instance yourself using the normal JAXP apis and
configure it however you want (including filters etc).

When everything else is configured, set the digester instance as the
event handler for that parser instance then tell the parser to start
parsing.

I haven't done this with xmlrules as I don't use it much. But it looks
like xmlrules.DigesterLoader.createDigester will parse a config file and
return a configured Digester instance ready for passing to a parser.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message