Procedure

AddXMLList

Module

uTemplates

Last Modified

7/15/2014 3:26:44 PM

Scope

Global

Declaration

procedure AddXMLList(Data, Fields: TStrings; const Pad: string; FldType: TTemplateExportField; Const Txt: string);

Calls Hierarchy


AddXMLList
 └ListTemplateFields
   └GetTemplateField
     ├LoadTemplateFieldByIEN
     ├LoadTemplateField
     └TTemplateField.Create
       ├TemplateFieldCode2Field
       └TemplateDateCode2DateType

Called-By Hierarchy


                                   AddXMLList
                             GetXMLFromWord┤ 
TfrmTemplateEditor.mnuImportTemplateClick┘ │ 
                     TTemplate.CanExportXML┘ 
                                ..(rec)..┤   
TfrmTemplateEditor.mnuExportTemplateClick┘   

Calls

Name Declaration Comments
ListTemplateFields procedure ListTemplateFields(const AText: string; AList: TStrings; ListErrors: boolean = FALSE); -

Called-By

Name Declaration Comments
TTemplate.CanExportXML function CanExportXML(Data, Fields: TStringList; IndentLevel: integer = 0): boolean; -
GetXMLFromWord function GetXMLFromWord(const AFileName: string; Data: TStrings): boolean; -


Source

1063  procedure AddXMLList(Data, Fields: TStrings; const Pad: string; FldType: TTemplateExportField; Const Txt: string);
1064  var
1065    i: integer;
1066    TmpSL: TStrings;
1067  
1068  begin
1069    if(Txt <> '') then
1070    begin
1071      TmpSL := TStringList.Create;
1072      try
1073        TmpSL.Text := Txt;
1074        Data.Add(Pad + '  <' + TemplateExportTag[FldType] + '>');
1075        for i := 0 to TmpSL.Count-1 do
1076          Data.Add(Pad + '    <p>' + Text2XML(TmpSL[i]) + '</p>');
1077        Data.Add(Pad + '  </' + TemplateExportTag[FldType] + '>');
1078      finally
1079        TmpSL.Free;
1080      end;
1081      if assigned(Fields) then
1082        ListTemplateFields(Txt, Fields);
1083    end;
1084  end;