File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

Dipali Kul
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a file called (which is different from
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:

<password>"value should be copied here"</password>

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

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic