> i can give you some instructions about how you can solve your the > problem in the narrow I'd appreciate it if you would.. thanks
> or (if you feel like contributing to betwixt), we > can talk about ways to solve this problem in the general :) Given my current work commitments there are not enough hours in the day.. sorry. Lance. -----Original Message----- From: robert burrell donkin [mailto:[EMAIL PROTECTED] Sent: Tuesday, 19 April 2005 5:40 AM To: Jakarta Commons Users List Subject: Re: [betwixt] Custom bean creation Importance: Low On Mon, 2005-04-18 at 15:05 +0930, Lance Semmens wrote: > I'm wanting to use my own logic to instantiate beans from XML elements. > After reading the doco, it seems that the way to do this is to create a > ChainedBeanCreator and add it to the BeanCreationChain. > > I am writing my own ChainedBeanCreator but I can't see how to access the > body of an XML element in the > create(ElementMapping mapping, ReadContext context, BeanCreationChain chain) > method. > > When i say "the body of an xml element" i mean "bar" part of > "<foo>bar</foo>". betwixt is sax-based. this has several implications for the architecture. the bean creation chain stuff is intended to help solve the problem of what object to create when faced with the initial element info set. this would allow you to do something clever when faced with the element <foo>. however, being SAX, you cannot read forward to find out what the mixed content (for example 'bar') is. a different mechanism is therefore required to support object creation based on mixed content (or indeed, full info set). this is something that i've wanted to add for a long time and have a good idea how to do it but i'm unlikely to get it done any time soon. (my main priority at the moment is fixing commons-logging which is difficult and that may take quite a while.) i can give you some instructions about how you can solve your the problem in the narrow or (if you feel like contributing to betwixt), we can talk about ways to solve this problem in the general :) i'll leave it up to you... - robert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
