That's right. Thank you, Rahul ------ Evgeny
On Wed, Feb 4, 2009 at 10:35 PM, Rahul Akolkar <[email protected]>wrote: > On Wed, Feb 4, 2009 at 1:43 PM, Евгений Антаев <[email protected]> wrote: > > Hi > > > > Can I use attribute value as a constraint in a pattern for Digester? > > > > For example > > > > <addressBook> > > ... > > <contact> > > <phone type='home'>00000000</phone> > > <phone type='work'>99999999</phone> > > </contact> > > ... > > </addressBook> > > > > I would like to use pattern to match home phone only. Something like > > "contact/pho...@type='home']". > > > <snip/> > > No. Commons Digester uses what it calls element matching patterns -- > they aren't true XPath expressions so the example above can't be used > as intended (only element names are matched). > > Short of defining your own digester Rule or Rules implementations, > perhaps you can simply ignore the bits you don't care about (so lets > say you use SetNextRule to add Phone objects to a Contact object, you > could ignore phones that aren't home phones). > > -Rahul > > > > ------ > > Evgeny > > > > Thanks > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
