Hello,
I have a xml file as shown below. I want to parse the file and store data in variables.
xml file looks like:
<TEST NAME="DataBaseurl">jdbc:oracle:thin:@localhost:1521:ora10</TEST>
<TEST NAME="Databaseuser">Pradeep</TEST>
......
and many other such lines
i want to read this file and print the out put as
DataBase server : localhost
Port Number: 1521
Database SID: ora10
Database User: pradeep
i was able to read the file and get database port
cat <file> | grep DataBaseurl | awk -F ":" '{print $5}'
but for hostname i get @localhost ( "@" not required ) and database SID i get ora10</TEST>
how can i get rid of thsese extras and how can i get databaseuser