Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replace tag value using Ant Script

 
Madhumathy Viswanathan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do anybody know how to replace a child tag value based on the parent tag�s attribute using ant script.
Example,
...
<host name="123">
<alias>Hello</alias>
</host>
<host name="xyz">
<alias>abc</alias>
</host>...
I have to replace the value of alias tag based on the name of host tag
<host name="123">
<alias>Good Morning</alias>
</host>

Could anybody help me in this?

Appreciate your help.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Madhumathy,
Take a look at this thread from when I was trying to do the same thing a few months ago. (The later posts in thread are more relevant.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic