struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Afshartous <>
Subject digester and whitespace in XML text body
Date Thu, 24 May 2001 17:25:00 GMT

I'd like to follow up on my original post.  It looks like the
digester.CallMethodRule.body method doesn't remove whitespace
from both ends of the XML body text.  However, other rules
like digester.CallParamRule.body actually do by calling method

Maybe the call to String.trim should be in a central place 
(i.e. digester.Digester) so that the individual rules don't 
have to worry about removing the whitespace ?

I'd be happy to work on a patch.


From: Nick Afshartous <>
Subject: digester and whitespace in XML text body
Date: Wed, 23 May 2001 17:11:27 -0400 (EDT)


I'm using the digester to process the nested content in
XML tags and am noticing that the leading/trailing whitespace
doesn't seem to be removed as advertised in the doc.  

For instance, the rule

                               "setAppName", 0);

results in the method setAppName being called with the surrounding
whitespace in 

       <app-name>    foo      </app-name>

If anyone has any idea how to tell the digester to ignore 
the leading/trailing whitespace please let me now, thanks.


View raw message