Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 47136 invoked from network); 26 Jun 2003 17:40:06 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 26 Jun 2003 17:40:06 -0000 Received: (qmail 40876 invoked by uid 1059); 26 Jun 2003 17:40:05 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 26 Jun 2003 17:40:05 -0000 Date: Thu, 26 Jun 2003 10:40:05 -0700 (PDT) From: "Craig R. McClanahan" To: Jakarta Commons Users List Subject: Re: Digester trims whitespace In-Reply-To: Message-ID: <20030626103813.U23176@icarus.apache.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thu, 26 Jun 2003, Juergen Weber wrote: > Date: Thu, 26 Jun 2003 14:31:34 +0200 > From: Juergen Weber > Reply-To: Jakarta Commons Users List > To: commons-user@jakarta.apache.org > Subject: Digester trims whitespace > > Digester removes leading or trailing whitespace. > That behavior is based on the most common use case for Digester, which is processing configuration files. > What is a simple way to get the whitespace? Is there somewhere an example of > a rule how to do that? I would like to read something like > > > blabla > > > > inclusive the blank lines before and after blabla into a String. > You will need to write your own Rule implementation in order to do this. The simplest thing (since the source is available) might be to copy one of the existing rules that knows how to process the element body, and simply omit the trim() method calls. > Thank you, > Juergen > Craig