commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anvay Lonkar <>
Subject [digester] addSetProperties converts tab (\t) to space ( )
Date Wed, 16 Jun 2010 17:08:38 GMT

I'm obersriving a peculiar behaviour with digester, related to whitespaces:

Consider this xml :
<variable-order>firstname    age    sex</variable-order>
<target is="223456789" data="anna    23    f"/>
<target is="1003" data="charlie    9    f"/>
<target is="1002" data="bob    33    f"/>
<target is="1004" data="danny    150    m"/>
<target is="1005" data="esther    88    f"/>
<target is="1006" data="fran    23    f"/>

The separator used for variable-order and data is "tab" i.e. "\t". Now when
I parse this XMl using digester, the separator is maintained for
variable-order but for "data" the tab gets replaces by a space ("\t" ->

Which leads me to believe that the digested.addCallMethod maintains the
whitespaces while the addSetProperties is doing some kind of processing
before assigning the attributes to the right properties.

Is my understanding correct? Is this a bug or expected behavior ? can I do
something to make the bahavior of addSetProperties same as that of
addCallMethod for whitespaces..

Thanks for your help!


Anvay Lonkar
+65 94659245

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message