52610.fb2 Пишем программу для создания книг FB2. - читать онлайн бесплатно полную версию книги . Страница 24

Пишем программу для создания книг FB2. - читать онлайн бесплатно полную версию книги . Страница 24

procedure SavePersons(title: string; LB: TListBox);

var

i: integer;

Person: TPerson;

begin

with LB do

if Count > 0 then

for i:= 0 to Count - 1 do

begin

Person:= TPerson(Items.Objects[i]);

OutList.Add(' <'+title+'>');

with Person do

begin

PrintString('first-name',fname);

PrintString('last-name',lname);

PrintString('middle-name',mname);

PrintString('nick',nick);

PrintString('email',email);

end;

OutList.Add(' </'+title+'>');

end;

end;

procedure SaveSequence;

var

s: string;

begin

with Form1 do

begin

if sequence.Text = '' then exit;

S:= '<sequence name="' +sequence.Text+'"';

if tome.Text = ''

then S:= S + '/>'

else S:= S + ' number="'+tome.Text+'"/>';

end;

OutList.Add(S);

end;

procedure SaveDescription;

const

max = 5;

mas: array[1..max] of string =

(

'<?xml version="1.0" encoding="windows-1251"?>',

'<FictionBook xmlns=""',

' xmlns: l="http://www.w3.org/1999/xlink">',

' <description>',

' <title-info>'

);

var

i: byte;

S: string;