sorry, it was a long day (and a friday too!).
A text file where each column has a fixed length. As in:
id name
1 tom
1 steve
1 john
2 jane
2 mary
Where each fields starts and ends at a specific column (here the first column
ends and the second column starts at the 7th character of each line).
I need to turn it into a XML file like:
<records>
<data id="1">
<name>tom</name>
<name>steve></name>
<name>john</name>
</data>
<data id="2">
<name>jane</name>
<name>mary</name>
</data>
</records>
One option would be to get an XMLReader to parse the text file and use XSLT to
translate it into the XML that i need. I've already started writing a reader
that parses the file based on a regular expression pattern, but if one already
exists, then i'd prefer to use it.
Thanks again,
Tom
-----Original Message-----
From: Joseph Kesselman [mailto:[EMAIL PROTECTED]
Sent: Monday, November 07, 2005 8:02 AM
To: [email protected]
Subject: Re: fixed length file XMLReader
I'm not sure I understand the question. Could you define what you mean by
"fixed length file"?
______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
----------------------------------------------------------------------
The information contained in this transmission is intended only for
the personal and confidential use of the designated recipients named
herein. If the reader of this transmission is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
transmission in error, and that any review, dissemination,
distribution, or copying of this transmission is strictly prohibited.
If you have received this communication in error, please notify the
sender and return and delete the original transmission immediately.
Thank you.