Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 71629 invoked from network); 20 Dec 2005 15:43:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Dec 2005 15:43:39 -0000 Received: (qmail 66995 invoked by uid 500); 20 Dec 2005 15:43:33 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 66944 invoked by uid 500); 20 Dec 2005 15:43:33 -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 66932 invoked by uid 99); 20 Dec 2005 15:43:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2005 07:43:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of valerio.schiavoni@gmail.com designates 64.233.162.194 as permitted sender) Received: from [64.233.162.194] (HELO zproxy.gmail.com) (64.233.162.194) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2005 07:43:32 -0800 Received: by zproxy.gmail.com with SMTP id 8so1535655nzo for ; Tue, 20 Dec 2005 07:43:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=M7BBNL4hNlTDSsdUVqAf4gVcXmU4nHTD7DwNh0685lsCyYMmimJdfP8qdhLB85pqinyhTARyIhfse6u8vk0Y1wcfilFpRTEMzFFvcSAiIVwVq4xqzQLdpGlfhJAz5YENhalxv/hnn5qpQO9BDDj015aQpNeEUiXBvkWxSHmcsaw= Received: by 10.65.239.2 with SMTP id q2mr3630005qbr; Tue, 20 Dec 2005 07:43:11 -0800 (PST) Received: by 10.65.196.14 with HTTP; Tue, 20 Dec 2005 07:43:11 -0800 (PST) Message-ID: Date: Tue, 20 Dec 2005 16:43:11 +0100 From: Valerio Schiavoni To: commons-user@jakarta.apache.org Subject: Using digester: how to create parent node knowing the child nodes... MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11122_33007688.1135093391558" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_11122_33007688.1135093391558 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, this is my first post to the commons ml, thanks for the support. i'm willing to use digester to parse this kind ofxml: newName there could be different kind of type values. Now, the value of the parameters should be used on the 1-arg constructor for objects of type RenameRelationOperatorParameter. At this time, there are no setParam method, and i' searching for a solution that avoid adding them. in my digesterReader at this time i have this (reduced to show the problem) : digester.addFactoryCreate("parameters", new OperatorParameterFactory()); and the OperatorParameterFactory (local to MyDigesterReader) is: public static class OperatorParameterFactory extends AbstractObjectCreationFactory { @Override public Object createObject(Attributes arg0) throws Exception { String operatorType =3D3D arg0.getValue("type"); OperatorParameter result =3D3D null; try { result =3D3D (OperatorParameter) Class.forName (operatorType).newInstance(); }catch ( ClassNotFoundException e) { throw new UnsupportedOperationException("OperatorParameter name= =3D d "+operatorType+" is not supported yet"); } return result; } } thanks for any support you can provide, valerio -- To Iterate is Human, to Recurse, Divine James O. Coplien, Bell Labs ------=_Part_11122_33007688.1135093391558--