I need a code example of groovy script which can access a xml file stored anywhere in my file system .
In this xml file i have the database credentials , my script need to access the database .
below is the xml
<jdbc-datasource>
<url>dbURL</url>
<driver-class>jdbcDriver</driver-class>
<username>admin</username>
<password>admin</password>
</jdbc-datasource>
Thanks in Advance 🙂
Say the file is at:
/home/mizan/db.xmlThen this should do it: