[digester] Grabbing data from sub-element attributes

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I'm trying to process a document that has some data as PCDATA in sub-elements, but some data in attributes of those sub-elements. I have a simple POJO to store the data, but I'm having difficulty gathering both pieces of information. Here's an

Re: [digester] Grabbing data from sub-element attributes

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Wouldn't you know it, just after I posted, I had an epiphany: On 5/13/2011 5:33 PM, Christopher Schultz wrote: entities entity foosome value/foo barsome other value/bar baz id=123 / /entity /entities The solution is:

Re: [digester] Grabbing data from sub-element attributes

2011-05-13 Thread Rahul Akolkar
On Fri, May 13, 2011 at 5:45 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Wouldn't you know it, just after I posted, I had an epiphany: On 5/13/2011 5:33 PM, Christopher Schultz wrote: entities   entity     foosome

Re: [digester] Grabbing data from sub-element attributes

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul, On 5/13/2011 5:53 PM, Rahul Akolkar wrote: Yeah, and probably more than one way even with out of the box rules: d.addObjectCreate(entities/entity, Entity.class); d.addCallMethod(entities/entity/foo, setFoo, 0);

Re: [digester] Grabbing data from sub-element attributes

2011-05-13 Thread Simone Tripodi
Hi Christopher, I suggest you following Rahul's suggestion, SetNestedPropertiesRule is not efficient as a direct invocation. Moreover, for foo/bar properties, there's a 3rd way to set them: d.addObjectCreate(entities/entity, Entity.class); d.addBeanPropertySetter(entities/entity/foo);