permaculture playing cards
The moose likes Ant, Maven and Other Build Tools and the fly likes ant problme Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant problme" Watch "ant problme" New topic

ant problme

bob khan

Joined: Dec 13, 2008
Posts: 1
i have a xml file that i want to change some attributes with specified elements. for example this is my xml file

<change name="babak" family="xxx"/>
<changeOne name="yyyy" family="kkkk"/>

i want to change the (change)element and (name) attribute babak--->kabab

first how can i pars the xml file with ant and change my specified attribute?
i need code example. tanx so much
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2851

"azzzzz bazzzzzz " please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.

|Asking Good Questions|
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

Hi Bob,

You can use property ${} or @@ style replacement in ANT. Please see their documentation

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
I agree. Here's the link:
subject: ant problme
It's not a secret anymore!