"Sanjeev_Das" <[EMAIL PROTECTED]> wrote ..
>
> Hi All,
>
> I need to find out the value present in between the xml tags. Is there
> any specific task in Ant to do so? If not can anyone suggest a
> workaround.
you could use antcontrib's regular expression capabilities in its propertyregex
task.....the following is untested though!
<target name="matchxml" description="match xml using regular expression">
<!-- load xml file into property -->
<loadfile property="xml.conf"
srcFile="conf/application.properties.xml"/>
<!-- match <test> </test> element -->
<propertyregex property="output"
input="xml.conf"
regexp="<test>([^\.]*)<test>"
select="\1"
casesensitive="false" />
<!-- print out the value -->
<echo message="${output}"/>
</target>
note my regex is untested...though it should be something like this...cant
remember how I dealt with the entity issues before.
hth, Jim Fuller
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]