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 ant problme Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
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: 2784

"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