From: Kevin Jackson Date: 2006-12-06T17:05:56+09:00 Subject: Re: Newbie: working with a text file and converting to xml > I have a tab-delimited text file that I would like to convert into an > xml file that can be read/imported into Apple's Final Cut Pro. > > The text file is 2 columns. > The first column is the time (timecode) > The second column is text (for sub-titling) > > I thought this might be a good starting project to get into Ruby > > Any suggestions on how I might approach this? look at XMLBuilder and FasterCSV Setup FasterCSV to use a tab as the delimiter instead of the comma and then use it to read the input and then use XMLBuilder to output datadata should be fairly simple, or you can avoid libraries and do it by yourself to learn more about ruby without getting bogged down in 3rd party libs x = Builder::XmlMarkup.new(:target => $stdout, :indent => 1) x.instruct x.timcode data x.sub-title data etc Kev