File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Replace tag value using Ant Script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Replace tag value using Ant Script" Watch "Replace tag value using Ant Script" New topic

Replace tag value using Ant Script

Madhumathy Viswanathan

Joined: Jun 01, 2005
Posts: 6
Do anybody know how to replace a child tag value based on the parent tag�s attribute using ant script.
<host name="123">
<host name="xyz">
I have to replace the value of alias tag based on the name of host tag
<host name="123">
<alias>Good Morning</alias>

Could anybody help me in this?

Appreciate your help.

Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29220

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.)

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Replace tag value using Ant Script
Similar Threads
Error with XDoclet In Hibernate
name-from-attribute doubt
How do I sign "jars" in the target directory using Maven?
urgent help on passing parameters thru ant script
How to do conditional execution ofa target