Yep...sounds like what I am looking for. I would love to see it even before it is submitted...;-)
James Birchfield Director, Application Development Genscape, Inc. (502) 583-2298 (o) (502) 639-3136 (c) -----Original Message----- From: Scott Sanders [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 1:19 PM To: Jakarta Commons Users List Subject: RE: Digester and XML Elements I think that is exactly what Jim is looking for. Jim? I would be interested in looking at it if submitted. Scott > -----Original Message----- > From: Christopher Lenz [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 10, 2002 10:14 AM > To: Jakarta Commons Users List > Subject: Re: Digester and XML Elements > > > It's not that bad either ;-) > > You need to write a rule that overrides the ContentHandler > used by the > XMLReader that Digester is using - which a rule has full read/write > access to. That custom content handler creates the DOM of the element > that triggered the rule. When the content handler encounters > the end of > the element it had started with, it gives control back to Digester. > > Actually, I've implemented such a creature last week or so, > although a > bit different: Triggered on some element, it builds a DOM > DocumentFragment of all content *beneath* the element it was > triggered > on, and pushes that DocumentFragment on Digester's stack. > > I could cleanup the code and submit a patch, if there's > interest (and a > committer with some spare time to look at it ;-))... > > Scott Sanders wrote: > > AFAIK, this is not possible with Digester today. I suppose > you could > > write rules to stream events and build up an Element node, > but that is > > a lot of work. > > > > I would say that it is 'possible', but not terribly easy. > > > > Scott > > > > > >>-----Original Message----- > >>From: Jim Birchfield [mailto:[EMAIL PROTECTED]] > >>Sent: Tuesday, September 10, 2002 5:03 AM > >>To: [EMAIL PROTECTED] > >>Subject: Digester and XML Elements > >> > >> > >>I have been using Digester for a while and love it. However > >>I am try to do something I have not seen an example of and > >>cannot seem to figure out how to do it. I need to grab a > >>portion of my config file as the raw XML. I want to be able > >>to invoke a method passing in an Element object (or even a > >>string if necessary) of a piece of XML in my file. Is that > >>possible with Digester today? > > -- > Christopher Lenz > /=/ cmlenz at gmx.de > > > -- > To unsubscribe, e-mail: > <mailto:commons-user-> [EMAIL PROTECTED]> > For > additional commands, > e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
