Well, no: I didn't explain myself clearly :)

I want to update several XML files _in place_ : I don't want an "output" 
directory, because then I'll have to find a way to put the files back in their 
original location :)

so, if I do source=file.xml and dest=file.xml it overwrites the original file 
with the change.

If I do source=**/file.xml without a dest= it doesn't actually do anything.

If I do source=**/file.xml and dest=**/file.xml it doesn't do anything (which 
makes sense: how can you have multiple outputs? :) )

If I use <fileset> with a wildcard <include name="**/file.xml"> then it doesn't 
do anything either (without the dest being set to a file, it seems to use 
buffers exclusively)

I've guessed that maybe I could somehow do a <fileset> to obtain the list and 
then iterate over that list with xmltask, but that seems backwards (and I can't 
figure out how to make that work cleanly)

Thanks!

Dana Lacoste

From: Brian Agnew [mailto:br...@oopsconsultancy.com]
Sent: Friday, May 29, 2009 2:43 AM
To: Lacoste, Dana (TSG Software San Diego)
Cc: xmltask-users@lists.sourceforge.net
Subject: Re: [Xmltask-users] Using replace on multiple files?


>From the manual:

<xmltask todir="output">
 <fileset dir=".">
  <includes name="*.xml"/>
  .....
reads from the XML files in the current dir and writes to the same filenames in 
the output dir.

So you need to identify the directory to write to, and it'll process each file 
and write the results to the specified directory.

Brian

On 29/5/09 02:19, Lacoste, Dana (TSG Software San Diego) wrote:
So I can do this:

<xmltask source=file1.txt dest=file1.txt>

with a <replace> task and update that file's content.

Is there a way I can do this with multiple files?

i.e. when I set "source" to **/*.xml (for example) it doesn't actually change 
anything if I don't set dest as well (I'm guessing it's setting output to a 
buffer, which I'm not reading so I don't see any change to the files)

(this is true if I do it as a source= or as a <fileset><include>)

Any suggestions?

Dana Lacoste







________________________________






------------------------------------------------------------------------------

Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT

is a gathering of tech-side developers & brand creativity professionals. Meet

the minds behind Google Creative Lab, Visual Complexity, Processing, &

iPhoneDevCamp as they present alongside digital heavyweights like Barbarian

Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com






________________________________






_______________________________________________

Xmltask-users mailing list

Xmltask-users@lists.sourceforge.net<mailto:Xmltask-users@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/xmltask-users





--

Brian Agnew                  http://www.oopsconsultancy.com

OOPS Consultancy Ltd

Tel: +44 (0)7720 397526

Fax: +44 (0)20 8682 0012
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to