Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 56803 invoked from network); 18 Aug 2006 20:20:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Aug 2006 20:20:24 -0000 Received: (qmail 94659 invoked by uid 500); 18 Aug 2006 20:20:18 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 94546 invoked by uid 500); 18 Aug 2006 20:20:17 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 94502 invoked by uid 99); 18 Aug 2006 20:20:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Aug 2006 13:20:17 -0700 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.191.106.90] (HELO web39506.mail.mud.yahoo.com) (209.191.106.90) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 18 Aug 2006 13:20:16 -0700 Received: (qmail 3061 invoked by uid 60001); 18 Aug 2006 20:19:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gqsQnHRKvLJUEFdDnfTP7Qef1yWHTyiuYhcfUl0tBzRbeEncCwPguhianv2qU+WHLsI8kpGB9Hma2ZoVlWWSR8N5MOMe9sQi8rvk2nm3NlSxrK3P31dio4OVwhe4AuaSiU5VQf7bcZBdVn/uZ6XFsQPwCuEVT+SfukR+y7OY8pg= ; Message-ID: <20060818201954.3059.qmail@web39506.mail.mud.yahoo.com> Received: from [156.63.134.4] by web39506.mail.mud.yahoo.com via HTTP; Fri, 18 Aug 2006 13:19:54 PDT Date: Fri, 18 Aug 2006 13:19:54 -0700 (PDT) From: Jeff Marendo Subject: Roundtripping using Digester and Betwixt To: commons-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1210814588-1155932394=:2429" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1210814588-1155932394=:2429 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I'm using the Commons Digester, specifically, to read data from XML files in order to create objects and I later use Betwixt to write objects out to XML. I'm using Digester "rules" files to specifiy XML layout so a known pattern is used while reading and creating objects. What I'm trying to figure out is how to make Betwixt write out information from an object in the same way that the Digester expects when reading (that is, so it matches according to the rules file that I have). For example, I have a rules file set up for a class called "Skill": An example XML file corresponding to a Skill would appear like so: COBOL 2/8/1985 1/19/2006 10 Adept If I modify the instance that is created after reading the file containing the sample data above and then use Betwixt to write out the updated info afterwards, I see the following: Adept 10 JCL How can I instruct Betwixt (the BeanWriter instance, I think) to write out the info so that it matches the pattern that I'm using when reading? Perhaps I should just be using Betwixt for both reading and writing, but I'd still like to be able to set things up, explicitly, so that the XML format for a given class is knowing ahead of time (so the format for reading and writing is the same). Please reply, if someone has an idea about this. Thanks! Jeff __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1210814588-1155932394=:2429--