You can maybe use the <echo> task for creating an xml file

<echo file="foo.xml">
<![CDATA[
<settings>
</settings>
]]>
</echo>

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Williams
Sent: Saturday, December 10, 2005 6:57 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] XMLPoke: What to do when file or element doesn't
exist?

I am working on a project where I am using a utility called XMLPreprocess
which needs a input file in a format of /settings/properties/@name.  I would
want to create this file at build time driven off of a nant.include file (I
have that part done already).  I was wondering what other people are doing
for creating a xml file with NAnt.  A file that does not exist before the
NAnt script starts, one that NAnt creates with some task.  I was looking at
making a change to XMLPoke with an boolean switch to tell it to create the
file if it doesn't exist and to also enter an element and/or attribute if
they don't exist either.  I have found other situtations, outside of my
little XMLPreprocess issue where this would be really usful.

Just looking for suggestions before spending too much time on this.  Maybe
someone has already built this already?  If not, does anyone else think that
this would be a nice to have that maybe NAnt should "just have" for us?

Eric




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to