Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 10256 invoked from network); 30 Jul 2008 11:57:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2008 11:57:09 -0000 Received: (qmail 40551 invoked by uid 500); 30 Jul 2008 11:57:01 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 40524 invoked by uid 500); 30 Jul 2008 11:57:01 -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 40513 invoked by uid 99); 30 Jul 2008 11:57:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 04:57:01 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.223.124.7] (HELO albatros.unitedhosting.co.uk) (83.223.124.7) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 11:56:04 +0000 Received: from www.oopsconsultancy.com (localhost.localdomain [127.0.0.1]) by albatros.unitedhosting.co.uk (8.13.1/8.13.1) with ESMTP id m6UBuHtE014356; Wed, 30 Jul 2008 12:56:17 +0100 Received: from 62.129.121.62 (SquirrelMail authenticated user bagnew@oopsconsultancy.com) by www.oopsconsultancy.com with HTTP; Wed, 30 Jul 2008 12:56:17 +0100 (BST) Message-ID: <12029.62.129.121.62.1217418977.squirrel@www.oopsconsultancy.com> In-Reply-To: <18730889.post@talk.nabble.com> References: <18648408.post@talk.nabble.com> <18730889.post@talk.nabble.com> Date: Wed, 30 Jul 2008 12:56:17 +0100 (BST) Subject: Re: How to read an XML file and extract values for the attributes using ANT script From: "Brian Agnew" To: "Ant Users List" Cc: user@ant.apache.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org You can use and its function. e.g. val = @{val} and some additional XPath magic ('following-sibling' or similar) to get the following XYZ node (not tried this, though! You may need an XPath tutorial like http://www.zvon.org/xxl/XPathTutorial/General/examples.html ) Brian On Wed, July 30, 2008 12:07, Alpesh Vesuwala wrote: > > Thank you all for your valuable inputs. > > I tried 'xmltask' for my solution and it is working really well. :jumping: > I really appreciate your kind responses. =) > > Please clarify one more doubt, > I may have multiple tags and they can be random. > > For example, > > > <ABC>abc</ABC> > <XYZ>xyz</XYZ> > > <ABC>123</ABC> > <XYZ>456</XYZ> > > ... > ... > > > > How can I do loop through each tags, like for and while loop in java :-(( > > Thanks, > Alpesh > -- > View this message in context: > http://www.nabble.com/How-to-read-an-XML-file-and-extract-values-for-the-attributes-using-ANT-script-tp18648408p18730889.html > Sent from the Ant - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > -- Brian Agnew http://www.oopsconsultancy.com OOPS Consultancy Ltd Tel: +44 (0)7720 397526 Fax: +44 (0)20 8682 0012 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org