ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jo Support <jo.supp...@gmail.com>
Subject xmlTask - Help
Date Mon, 22 Nov 2010 13:05:08 GMT
Hello people,

I'm sorry to write here about a third party library, but it seems that
official xmlTask mailing list is off (no messages since subscription,
three days ago), and there are no news about Oops Consultancy since
September 2009. So I'll try to quest here, hoping for someone to be
able to answer me. By the way, if you know a better tool to manipulate
xml files by Ant, I'll appreciate suggestions very much.

In my house I need to change the floor type of every room with
tapestry red from whatever they are to terracotta.
This is my house now:

<house>
       <room>
               <name>living</name>
               <tapestry>red</tapestry>
               <floor>wood</floor>
       </room>
       <room>
               <name>dining</name>
               <tapestry>red</tapestry>
               <floor>marble</floor>
       </room>
       <room>
               <name>bed</name>
               <tapestry>yellow</tapestry>
               <floor>wood</floor>
       </room>
</house>

And this is my house as I'd like it to be:

<house>
       <room>
               <name>living</name>
               <tapestry>red</tapestry>
               <floor>terracotta</floor>
       </room>
       <room>
               <name>dining</name>
               <tapestry>red</tapestry>
               <floor>terracotta</floor>
       </room>
       <room>
               <name>bed</name>
               <tapestry>yellow</tapestry>
               <floor>wood</floor>
       </room>
</house>

I didn't find the way using XmlTask to set up a condition on tags and
not attributes.
I've tried something like this:

<replace path="/house/room[@tapestry='red']/@floor" withText="terracotta"/>

but it doesn't seem to handle tags like attributes, and I found
nothing about it on documentation at
http://www.oopsconsultancy.com/software/xmltask/ .

Any suggestion?
Thanks in advance,

Jo

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message