Sort of like this one?
http://jakarta.apache.org/ant/manual/CoreTasks/xmlproperty.html
Thats a new task in Ant 1.5. Could you compare/contrast your work with this
tasks capabilities and perhaps get your work merged in with it if it
provides additional features?
The <property> task is so overloaded now that it was thought best to make it
a separate task rather than adding one more feature to it.
Erik
----- Original Message -----
From: "Alexey Solofnenko" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 3:23 PM
Subject: [SUBMIT] <property> to read XML file
> Hello,
>
> I have tweaked <property> task a little to load values from XML file.
The
> loaded property names are: node1/node2/node2.Attribute or
node/1/node2#TEXT.
> If there are several nodes with the same names the first node's value will
> be taken. Attached please find the source and a diff from version 1.48 .
> This is an example how it works:
>
> build2.xml:
>
> <project default="main" basedir=".">
> <property xmlFile="build2.xml"/>
> <target name="main">
> <echo message="Target.name=${project/target.name}">
> Basedir=${project.basedir}
> Target.name=${project/target.name}
> Message=${project/target/echo.message}
> </echo>
> <echo>
> Text:
> ${project/target/echo#TEXT}
> ======================================================
> </echo>
> </target>
> <target name="main3">
> <echo>
> Basedir=${project.basedir}
> Target.name=${project/target.name}
> Message=${project/target/echo.message}
> </echo>
> </target>
> </project>
>
> Output:
>
> Buildfile: build2.xml
>
> main:
> [echo] Target.name=main
> [echo] Basedir=.
> [echo] Target.name=main
> [echo] Message=Target.name=main
> [echo]
> [echo] Text:
> [echo] Basedir=.
> [echo] Target.name=main
> [echo] Message=Target.name=main
> [echo]
> [echo] ======================================================
> [echo]
>
> BUILD SUCCESSFUL
> Total time: 1 second
>
> --
> { http://trelony.cjb.net/ } Alexey N. Solofnenko
> { http://www.inventigo.com/ } Inventigo LLC
> Pleasant Hill, CA (GMT-8 usually)
>
>
----------------------------------------------------------------------------
----
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>