• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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: 28654
211
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic