Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 10566 invoked from network); 20 Jul 2007 15:45:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jul 2007 15:45:47 -0000 Received: (qmail 98678 invoked by uid 500); 20 Jul 2007 15:45:45 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 98342 invoked by uid 500); 20 Jul 2007 15:45:43 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 98331 invoked by uid 99); 20 Jul 2007 15:45:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2007 08:45:43 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [138.100.8.58] (HELO relay1.fi.upm.es) (138.100.8.58) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2007 08:45:39 -0700 Received: from localhost (localhost [127.0.0.1]) by relay1.fi.upm.es (Postfix) with ESMTP id D83A54FEABB for ; Fri, 20 Jul 2007 17:45:17 +0200 (CEST) Received: from clip.dia.fi.upm.es (www.clip.dia.fi.upm.es [138.100.11.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by relay1.fi.upm.es (Postfix) with ESMTP id BCDC54FEAB9 for ; Fri, 20 Jul 2007 17:45:17 +0200 (CEST) Received: from nswoboda by clip.dia.fi.upm.es with local (Exim 4.43) id 1IBufM-0006po-RQ for user@ant.apache.org; Fri, 20 Jul 2007 17:45:16 +0200 Subject: Re: Using Java xml properties file with Ant To: user@ant.apache.org Date: Fri, 20 Jul 2007 17:45:16 +0200 (CEST) In-Reply-To: <20070720144712.8372850283@ws6-5.us4.outblaze.com> from "ryan@ryano.us" at Jul 20, 2007 10:47:12 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: From: nswoboda@clip.dia.fi.upm.es X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: nswoboda@clip.dia.fi.upm.es X-SA-Exim-Scanned: No (on clip.dia.fi.upm.es); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new using ClamAV at efiltro.fi.upm.es X-Virus-Checked: Checked by ClamAV on apache.org > It would be nice if there were a way for the xmlproperty task to create pro= > ps with an XPath like syntax. Something like: > > temp.properties.entry(key=3D"appName") would return Name I think that we would want something like this, the other suggestions imply some 'known' ordering on the properties in the xml file which isn't in the spirit of things. But the thing that surprises me is that the XML file is in the 'blessed by Sun' format for properties, so ideally the property task should be able to read it. loadFromXML was introduced in 1.5, is the issue related to not wanting to have to rewrite it for ant to work with older java versions? Nik > > ----- Original Message ----- > > From: nswoboda@clip.dia.fi.upm.es > > To: user@ant.apache.org > > Subject: Using Java xml properties file with Ant > > Date: Fri, 20 Jul 2007 16:05:19 +0200 (CEST) > >=20 > >=20 > > We are building a piece of software which has a number of Java > > properties files in xml format (the kind which are read with > > Properties.loadFromXML). An example: > >=20 > > > > > >=20 > > > > Name > > Something > > 2.5 > > > >=20 > > I would like to be able to read these files and use their properties from > > within ant. The property task doesn't seem to handle properties files > > in xml so I have been trying to use the xmlproperty task: > >=20 > > > >=20 > > But then all the values get thrown into the temp.properties.entry > > property: > >=20 > > using Prop=3D${temp.properties.entry} > >=20 > > gives: > >=20 > > [echo] using Prop=3DName,Something,2.5 > >=20 > > I assume that this should be trivial but I can't find a good solution to > > get it to do the obvious thing (load three separate properties). > > Suggestions? > >=20 > > Second question, since the Sun dtd specifies SYSTEM (not a publicid), is > > it possible to use xmlcatalog? > >=20 > > Thanks, > >=20 > > Nik > > ____________________________________________________ > >=20 > > Conversation, n.: > > A vocal competition in which the one who is catching his breath > > is called the listener. > >=20 > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > For additional commands, e-mail: user-help@ant.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > ____________________________________________________ "I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter." -- Winston Churchill --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org