Hello!
I would like to import a previously saved XML file into a AdvStringGrid.
Export works, but when I try to load the file, the followng error raises:
XMLDOM parsing error -1072896764 on line 4.
This is the code (and just two Buttons and one AdvStringGrid on the form):
procedure TForm2.Button1Click(Sender: TObject);
var
sl: TStringList;
i: integer;
begin
AdvStringGrid1.Cells[1,1]:='Cell';
AdvStringGrid1.Cells[1,0]:='Header';
sl := TStringList.Create;
for i := 0 to AdvStringGrid1.ColCount-1 do
sl.Add(AdvStringGrid1.Cells[I,0]);
AdvStringGrid1.SaveToXML('C:\temp\test.xml', 'xmllist', 'xmlrecord', sl, true);
sl.Free;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
AdvStringGrid1.Clear;
AdvStringGrid1.LoadFromXML('C:\temp\test.xml'); //<- also with both addional parameters in all combinations the error raises.
end;
Any suggestions?
Thanks in advance and best regards
Andreas