The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[C++] File I/O (Reading from a Random-Access File) VersEtreOuNe High Level Programming 0 02-12-2008 01:34 PM
reading from a file and pass as variables and ignore # in the file konark Shell Programming and Scripting 4 11-08-2007 12:55 AM
Reading a file and writing the file name to a param file. thebeginer UNIX for Advanced & Expert Users 1 10-05-2007 01:38 PM
Reading file names from a file and executing the relative file from shell script anushilrai Shell Programming and Scripting 4 03-10-2006 02:25 AM
Reading specific contents from a file and appending it to another file dnicky Shell Programming and Scripting 5 10-04-2005 02:45 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-15-2005
Registered User
 

Join Date: Nov 2005
Posts: 13
Need help reading XML file

If someone out there could help me out with this problem. I would really

appreciate it.

My requirement is :Read XML and put data in Test.txt file.Using Shell script(bourn)


My xml file:

<root>

<header>
<HeaderData1>header1</HeaderData1>
<HeaderData2>header2</HeaderData2>
</header>

<detailsRecord>
<DetailRecord1>detail1</DetailRecord1>
<DetailRecord2>detail2</DetailRecord2>
<detailsRecord>

<detailsRecord>
<DetailRecord1>detail3</DetailRecord1>
<DetailRecord2>detail4</DetailRecord2>

<detailsRecord>

<trailer>
<trailer>trailer1</trailer>
</trailer>

</root>





My File Test.txt

Header Record : header1 header2
DetailsRecord : detail1 detail2
DetilsRecord : detail3 detail4
Trailer Record: trailer1



Fixed lengths in Test.txt FILE:

header1(1-7) header2(14-20)
detail1(1-7) detail2( 18-24)
detail3(1-7) detail4( 18-24)
trailer(1-7)






I can't use whitespace as a delimiter.


Thanks you guys very much,
I really appreciate it.
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0