Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 20643 invoked from network); 17 Aug 2005 11:52:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Aug 2005 11:52:03 -0000 Received: (qmail 65137 invoked by uid 500); 17 Aug 2005 11:51:59 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 64503 invoked by uid 500); 17 Aug 2005 11:51:57 -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 64484 invoked by uid 99); 17 Aug 2005 11:51:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2005 04:51:56 -0700 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) Received: from [137.248.254.138] (HELO mailgate.med.uni-marburg.de) (137.248.254.138) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2005 04:52:16 -0700 Received: from localhost (localhost [127.0.0.1]) by mailgate.med.uni-marburg.de (Postfix) with ESMTP id 85FB2A8DE8 for ; Wed, 17 Aug 2005 13:51:51 +0200 (CEST) Received: from mailgate.med.uni-marburg.de ([127.0.0.1]) by localhost (mailgate [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12903-03 for ; Wed, 17 Aug 2005 13:51:11 +0200 (CEST) Received: from post.med.uni-marburg.de (post.med.uni-marburg.de [137.248.253.12]) by mailgate.med.uni-marburg.de (Postfix) with ESMTP id A8B04A8D6D for ; Wed, 17 Aug 2005 13:51:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by post.med.uni-marburg.de (Postfix) with ESMTP id 9470C270C5 for ; Wed, 17 Aug 2005 13:51:11 +0200 (CEST) Received: from post.med.uni-marburg.de ([127.0.0.1]) by localhost (post [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23989-07 for ; Wed, 17 Aug 2005 13:51:09 +0200 (CEST) Received: from [137.248.224.93] (wstlehre93.med.uni-marburg.de [137.248.224.93]) by post.med.uni-marburg.de (Postfix) with ESMTP id 50E21270BC for ; Wed, 17 Aug 2005 13:51:08 +0200 (CEST) Message-ID: <430324A9.30006@med.uni-marburg.de> Date: Wed, 17 Aug 2005 13:51:05 +0200 From: Oliver Heger User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: de, de-at, en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [configuration] Support for XPath like queries? References: <1124277610.6519.16.camel@alnus.derwald.at> In-Reply-To: <1124277610.6519.16.camel@alnus.derwald.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at med.uni-marburg.de X-Virus-Scanned: by amavisd-new at med.uni-marburg.de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Christoph Jaeger schrieb: > Hi, > > I was reading the documentation about XMLConfiguration on > http://jakarta.apache.org/commons/configuration/howto_xml.html > and now I wonder how it would be possible to get a list of all the > fields of a table with a given tableType. The XML structure describe in > the example looks like: > > > > > > ... > ... > ... > ... > >
> > > ... > ... > ... > ... > >
>
> > Now you can query a list of fields of the first table using a property > name of "tables.table(0).fields.field". > > But how would you query a list of fields for the table with tableType > "system"? One way could be to loop over all "tables.table[@tableType]" > elements, remember the index of the table containing the given tableType > and use the syntax described above to get the list of fields. > > I think it would be a lot easier (to write, and also to read the code > afterwards), if one could just write: > "tables.table[@tableType='system'].fields.field" > > Is a syntax like this supported by Commons Configuration? I think a read > about something like this, but can not seem to remember where. > > Best Regards, > > Christoph Jäger > > Does the commons-configuration XMLConfiguration class support XPath > Hi Christoph, XPath syntax is not yet supported. There is an enhancement request for this in bugzilla: http://issues.apache.org/bugzilla/show_bug.cgi?id=35753 I cannot estimate when we come to implement this, but I am myself very interested in this topic. Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org