1

Hi i want to replace a token value in ant script with following string

<TagType Name="some name" param1="prefix=%s" param2="_default" />

since we cannot give directly '<','"','%' into an ant script, we need to use escape sequences like '&lt;','&quot;'..

Is there any online tool which can apply escape characters for a given string? I hope already there are tools for this :)


For a given string like this

<TagType Name="some name" param1="prefix=%s" param2="_default" />

I need escaped string like this

&lt;TagType Name=&quot;some name&quot; param1=&quot;prefix=%s&quot; param2=&quot;_default&quot; /&gt;
Anil Tallam
  • 331
  • 4
  • 10
  • Can you update your question to give a bit more detail? Are you replacing the entire line, or you need to replace the values contained in that line? – David W. Mar 11 '13 at 15:36
  • need to replace value with given line – Anil Tallam Mar 11 '13 at 15:38
  • What value with the given line? You have an Ant script with a parameter for this particular task line? Or, do you need to replace _some name_? Can you show a bit of your Ant script? – David W. Mar 12 '13 at 19:50

1 Answers1

3

At last i found this online tool which does the job of xml escaping. http://www.freeformatter.com/xml-escape.html

Anil Tallam
  • 331
  • 4
  • 10