Here is another common one. If you have to write a from Ant

<?xml version=”1.0″ encoding=”UTF-8″?>
<project name=”attrtest” basedir=”.” default=”writeFile”>

<target name=”writeFile”>

<!– plain write to file –>
<echo file=”sitest.txt”>
Hello Test! This content is in a file\n
blah more blah

<!– plain write with append –>
<echo file=”siappend.txt” append=”true”>
this is a write test with append.
you have to run it multiple times to see it in action.

<!– if you write HTML like files or write special characters use CDATA –>
<echo file=”sitest.html”><![CDATA[
This is an html file