You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stojanov Alexej <Al...@bitmarck.de> on 2008/07/28 13:35:57 UTC
RE: How to read an XML file and extract values for the attributes
using ANT script
Better: http://ant.apache.org/manual/CoreTasks/xmlproperty.html
-------
<project name="xmlProperty" basedir="." default="main">
<target name="main">
<xmlproperty file="C:/myTITLE.xml" prefix="myFileContent"/>
<echo message=" ABC = ${myFileContent.TITLE.ABC}"/>
<echo message=" XYZ = ${myFileContent.TITLE.XYZ}"/>
</target>
</project>
-------
Alexej Stojanov
-----Original Message-----
From: stguitar@mac.com [mailto:stguitar@mac.com]
Sent: Friday, July 25, 2008 3:24 PM
To: Ant Users List
Subject: Re: How to read an XML file and extract values for the
attributes using ANT script
FYI. You could read the file into a property and use regular
expressions. Since it's XML the patterns would not be too difficult
Sent from my iPhone
On Jul 25, 2008, at 4:36 AM, Alpesh Vesuwala
<al...@yahoo.co.in> wrote:
>
> Hello Friends,
>
> I have an XML file to read from it and extract values of some
> attributes.
> These extracted values can further processed by the ANT script.
>
> The Sample XML File is:
>
> <TITLE>
> <ABC>abc</ABC>
> <XYZ>xyz</XYZ>
> </TITLE>
>
> I want to extract 'abc' and 'xyz' from this sample code. Please help
> me out,
> how can I do that?
>
> 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-tp18648408p18648408.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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
***********************************************************************
Die Information in dieser email ist vertraulich und ist ausschliesslich
fuer den/die benannten Adressaten bestimmt. Ein Zugriff auf diese
email durch andere Personen als den/die benannten Adressaten ist
nicht gestattet. Sollten Sie nicht der benannte Adressat sein, loeschen
Sie bitte diese email.
***********************************************************************
BITMARCK Software GmbH
Paul-Klinger-Strasse 15, 45127 Essen
Amtsgericht Essen HRB 20680
Geschaeftsfuehrer: Frank Krause, Andreas Prenneis
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org