ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: replace &lt; with < in property ??
Date Thu, 02 Feb 2006 19:06:24 GMT
Hi,

thanks for your suggestions :

> Remember that in XML &lt; is turned into < before ant sees it, so you
> need to escape the search and replace
> strings:
> 
> 
>  <propertyregex property="foobar"
>                    input="${auftrag.bemerkung}"
>                    regexp="&amp;lt;"
>                    replace="&lt;"
>                    casesensitive="false" />


but :

<property name="foobar" value="&lt;bla&gt;foobar&lt;/bla&gt;" />

  <echo>${foobar}</echo>

    <propertyregex property="foo"
           input="${foobar}"
           regexp="&amp;lt;"
           replace="&lt;"
           casesensitive="false" />
  <echo>${foo}</echo>

just gives me :

     [echo] <bla>foobar</bla>
     [echo] ${foo}

hm, let's see the other way around :

<echo file="J:/test/test.txt">fixed=${foobar}</echo>

yup, the property is written as :

fixed=<bla>foobar</bla>

but doesn't work either, when loading the propertyfile afterwards,
property ${fixed} get's not expanded --> ${fixed}

Even after manuelly changing the propertyfile to :
fixed=&lt;bla&gt;foobar&lt;/bla&gt;
it does not get expanded.

Any other ideas ?!?

by4now, Gilbert


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message