dcsimg
Envoking an xml file from build.xml to fetch varaibles value
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   pankaj_kumar
Posted On:   Friday, September 1, 2006 01:20 PM

PAnkaj Kumar


I want to envoke an external xml file which holds all neccssary info in following forms :
DB_DRIVER
oracle.jdbc.driver.OracleDriver .
Now I want to envoke these values in my build.xml file which are necceassary for database connection. All such info are stored in batch.xml. Any help in this regards will be apprecciated.



regards
Pankaj

Re: Envoking an xml file from build.xml to fetch varaibles value

Posted By:   Robert_Lybarger  
Posted On:   Friday, September 1, 2006 05:26 PM

There is an "xmlproperty" task, but using that will probably give you properties that look like "blah.name=DB_DRIVER" and "blah.value=...", where I imagine you are wanting a single property of "DB_DRIVER=..." instead. Not being fluent with xmlproperty itself, I would write a little XSLT file to convert the external xml file into a standard properties file format, use a standard "xslt" ant task to run the transform, then use a standard "property file=..." ant task to pull that into ant. Then again, I write a lot of XSLT lately.
About | Sitemap | Contact