Thanks, for the answers, but didnt worked. I try to clear my problem,
Here is the input:
0608A;
Teszt Kft;
33445566222;
;
20060101;
20060131;
0A0001C002A 33445566222
0A0001C007A Teszt kft
this text repeat himself with other data several times
This, should look like this:
<?xml version="1.0" encoding="windows-1250"?> 0608A Teszt kft # the first line from the txt 33445566222 # second line #thrid line, in this txt is blank 20060101 # fourth 20060131 # fifth 11111111122 # and the lines... Próba Cég .....So my problem is how can I get an XML source like above. For the columns
I already have this script:
outfile = ARGV.shift
lines = ARGF.readlines
marked_up_lines = lines.map do |line|
words = line.split
‘’ + words[1] + ‘’ + “\n”
end
File.open(outfile,‘w’) do |file|
file.write marked_up_lines.join
end
This works fine, but I dont know what to do with the first 6 lines to
bring it to look like above and how can I bring ruby to repeat himself
and what for a character need I to use for repeating…
Regards,
Daniel