Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd April 2013, 13:19
SmilePlease SmilePlease is offline
Junior Member
 
Join Date: Apr 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Exclamation Shell SCript to read XML tags and the data within that tag

Hi unix Gurus,

I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information.

For example
<SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME ="ACTRL_BNFT_KEY_DMN" OBJECTVERSION ="1" OWNERNAME ="COC_V20_ETL_APPL" VERSIONNUMBER ="1">
<SOURCEFIELD BUSINESSNAME ="" DATATYPE ="varchar" DESCRIPTION ="" FIELDNUMBER ="1" FIELDPROPERTY ="0" FIELDTYPE ="ELEMITEM" HIDDEN ="NO" </SOURCE>

From the above xml file , I have to read the xml file and get the source name from the file as the below output.

SOURCE ->ACTRL_BNFT_KEY_DMN.

Please help me UNIX Gurus.
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:07.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.