Hello
 
I simply want to write some text (well actually XML) to a file.  I also think a function/task to append a line text to a file would be handy.
 
Because I am writing out XML to file, it is very tedious to write the code as a function - since I need escape all the < > & " etc characters.  A task would be better suited and have it write the contents of an element to the file - that way I can use a CDATA section to write the XML in plain text.  In Ant, I could have used the concat task like this
 

<concat eol="crlf" outputencoding="UTF-8" destfile="MyXml.xml"><![CDATA[<?xml version="1.0" encoding="utf-8"?>

<Hello>

<Contents>World</Contents>

</Hello>]]></concat>

 
but the NAntContrib concat task seems to be tailored to concatonating file contents only.  Before I write this task (and it is fairly trivial)  can someone tell me if I have missed something blindingly obvious - like an existing task in NAnt / NAntContrib to do what I want.  Or if you have already written such a task and don't mind sharing your work....?
 
Cheers
 
Chris

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System
- after being sent from Granta Design Ltd
______________________________________________________________________

Reply via email to