Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 36890 invoked from network); 18 Feb 2006 00:18:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Feb 2006 00:18:17 -0000 Received: (qmail 44746 invoked by uid 500); 18 Feb 2006 00:18:13 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 44713 invoked by uid 500); 18 Feb 2006 00:18:12 -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 87768 invoked by uid 99); 17 Feb 2006 23:23:51 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) From: "Siddharth Mathur" To: Subject: [Digester] Converting String value of an attribute to array of integers Date: Fri, 17 Feb 2006 18:23:37 -0500 Organization: Nellymoser, Inc. Message-ID: <000c01c63419$2eca1460$7002a8c0@Mathur> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcY0GS3uGTUEhgvCTJe46q8TJJOy+g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear all, I am trying to use Digester to read my own XML format (shown below) and convert it to correctly initialized objects. 90 90 [...more entries here] AAC Classes A, B, C are all derived from a parent class which has three properties: i) ID (integer) ii) author (String) iii) depends (array of IDs i.e integers) Digester makes it very easy to create setter and getter methods and read in (i) and (ii) above. But how do I modify the default Rule so that the String value of the "depends" attribute is converted to an array of integers property? I will be happy to reformat the depends="4,6" part if required. I currently use d.addSetProperties("List/A") to read in my other attributes. Thank you for your time and patience, Siddharth --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org