Thursday, August 13, 2009

Using Ant XmlTask to read properties from xml file

xmltask provides the facility for automatically editing XML files as part of an Ant build
http://www.oopsconsultancy.com/software/xmltask/

    <path id="externaltask.ant.classpath">
<pathelement location="./xmltask-v1.15.jar"/>
</path>

<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpathref="externaltask.ant.classpath"/>

<xmltask source="config.xml">
<copy path="//deploymentPath/text()" property="deployment"/>
<copy path="//software/beaHome/text()" property="weblogicHome"/>
</xmltask>

No comments:

Post a Comment