ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Solofnenko <alex...@mdli.com>
Subject RE: [SUBMIT] <property> to read XML file
Date Mon, 06 May 2002 21:57:34 GMT
You are right. I should have looked at it. Fortunately it was a quick fix.

- Alexey.

-----Original Message-----
From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
Sent: Monday, May 06, 2002 1:32 PM
To: Ant Users List
Subject: Re: [SUBMIT] <property> to read XML file


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" <alexeys@mdli.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message