<case value="xml">
<copy file="${source.dir}/${fichier.dir}/${fichier}.${fichier.type}" todir="${cible.dir}/${fichier.dir}"/>
<propertycopy name="ListeParams" from="ListeParameter${fichier}" override="true" />
<foreach list="${ListeParams}" delimiter="," target="majFichierXML" param="param" inheritall="true"/>
<target name="majFichierXML">
<if>
<isset property="appli.bat.fichier.parameter.${param}"/>
<then>
<propertycopy name="valeurxml" from="appli.bat.fichier.parameter.${param}" override="true" />
<!-- <propertyfile file="${cible.dir}/${fichier.dir}/${fichier}.${fichier.type}">
<entry key="${param}" value="${valeurxml}"/>
</propertyfile> -->
<echoxml file="${cible.dir}/${fichier.dir}/${fichier}.${fichier.type}" append="true">
<param>${valeurxml}</param>
</echoxml> -->
<!--*****************************************************************************-->
<!-- <replaceregexp file="${cible.dir}/${fichier.dir}/${fichier}.${fichier.type}"
match="${param}=([^\.]*)"
replace="${param}=${valeurxml}"
byline="true"/> -->
<!--*****************************************************************************-->
<!-- <propertyregex property="paramXML" input="${param}" casesensitive="false"> -->
<!-- <replaceregexp pattern="<${param}>" replace="<${param}>${valeurxml}</${param}> " /> -->
<!-- </propertyregex> -->
<!--*****************************************************************************-->
<echo>
-param=${param}
-valeurxml=${valeurxml}
==>${param}=${valeurxml}
</echo>
<property name="xml.xpath" value="${param}/text()" />
<xmltask source="${source.dir}/${fichier.dir}/${fichier}.${fichier.type}" dest="${cible.dir}/${fichier.dir}/${fichier}.${fichier.type}" encoding="iso-8859-1">
<replace path="${xml.xpath}" withText="${valeurxml}"/>
</xmltask>
</then>
</if>
</target>
Partager