Orangevolt ANT Tasks » Tasks » preferences » Element test
Element testElement export

2.4.4.1.  Example

<?xml version="1.0"?>  
    
  <project basedir="." name="foo" default="main">
    <taskdef classpath="orangevolt-ant-tasks-1.3.2.jar" resource="com/orangevolt/tools/ant/taskdefs.properties"/>
      
    <target name="check">
      <preferences type="user" path="com/orangevolt/tools/foo">
          <!--
            property version_found will be defined if
            node current/version exists
          -->
        <test path="current" node="version" property="version_found"/>
          <!--   
            property listeners_ok will be defined if entry listeners
            exists in current/version and its value is 2
          -->
        <test path="current/version" name="listeners" value="2" property="listeners_ok"/>
      </preferences>
    </target>
  </project>