File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: copy value from a file into xml tag of other file using ant