Reputation: 761
I use nant for Build automation. Inside my nant file I include another peroperty file with all the properties I use.
Later I use the existing properties to replace the tokens inside my web.config file
<copy file="web.config" tofile="templateed.web.config" overwrite="true">
<filterchain>
<expandproperties/>
</filterchain>
</copy>
in the property file i have the following property
<property name="url" value="/test?key=1&value=1" />
result: /test?key=1&value=1
expected: /test?key=1&value=1
does anyone know how to do that?
Thanks!
Jürg
Upvotes: 0
Views: 82
Reputation: 944255
&
means "start of character reference" in XML.
If you want an &
as data, you have to use the character reference for it: &
.
So, if you want &
as data, you have to replace the &
with &
such: &amp;
.
However, what you have now appears to be correct for "a URL". So if you want to take that data and put it in another XML file, you should probably let it be decoded to /test?key=1&value=1
but then encode it for XML when you put it in the new XML.
Upvotes: 2