• 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

copy value from a file into xml tag of other file using ant

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


I have a file called local.properties (which is different from build.properties).
This file has the values defined like:

name.db.username =db_user
name.db.pwd =db_pwd


I need to retrieve the password value and copy this into password tag value to a jdbc.xml file. The format of jdbc.xml is as below:

<datasource>
<id>default</id>
<defaultschema></defaultschema>
<driver></driver>
<url></url>
<username></username>
<password>"value should be copied here"</password>
<minconnections>3</minconnections>
<maxconnections>60</maxconnections>
<connectiontestsql></connectiontestsql>
</datasource>


I need to do plug in this code in an existing build.xml file written using ant script.
Would really appreciate a quick response.

Thanks
Dipali
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic