• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Manipulating XML files using ant

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I'm using cactus to test an enterprise application. I need to have a test EAR (with the cactus tests as a separate web app) and a real EAR (with no cactus) for deployment onto the production server.

I would like to be slick about this, and use the same application.xml file for both, but I need to have ant inject an extra <module> tag into the application.xml to hold the tests. Are there any ant tasks that can deal with xml files (or deployment descriptors in general) in a nice way?

I suppose I could write my own ant task and just use SAXP or something like that, but I'd rather not reinvent the wheel.
 
Saloon Keeper
Posts: 27705
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the XSLT Ant function can modify XML files.

Beyond that, I'm unclear if what you want is the way to do it, but I'm not up to speed in that area at the moment.
 
reply
    Bookmark Topic Watch Topic
  • New Topic