This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes copy value from a file into xml tag of other file using ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "copy value from a file into xml tag of other file using ant" Watch "copy value from a file into xml tag of other file using ant" New topic
Author

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

Dipali Kul
Greenhorn

Joined: Oct 03, 2012
Posts: 1
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
 
jQuery in Action, 2nd edition
 
subject: copy value from a file into xml tag of other file using ant
 
Similar Threads
how many initial connections should be opend
Doubt on Servlet having database connection?
P6spy does not create spy.log for stand-alone Java program
How to get Browser Variable value in side JSTL
how to map cmp bean to data source: jboss3