aspose file tools*
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
Author

ant problme

bob khan
Greenhorn

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

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

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
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

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


SCJP, SCWCD.
|Asking Good Questions|
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ant problme