You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Anvay Lonkar <an...@gmail.com> on 2010/06/16 19:08:38 UTC

[digester] addSetProperties converts tab (\t) to space ( )

Hi,

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

Consider this xml :
<target-list>
<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"/>
</target-list>

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" ->
"\n").

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


Anvay Lonkar
+65 94659245