Export AND Import XML?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
moelski
Newbie
Newbie
Posts: 92
Joined: Tue Jun 19, 2007 12:00 am
Contact:

Export AND Import XML?

Post by moelski » Thu Jun 26, 2008 11:19 am

Hi !

You can use SaveToFile and LodFromFile to export / import TEE files. But is there a possibility to import / export XML?

And second question ... Can I use a String which includes the XML stuff and TChart generates the Chart from that?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jun 27, 2008 10:21 am

Hi moelski,
You can use SaveToFile and LodFromFile to export / import TEE files. But is there a possibility to import / export XML?
You can export a chart to XML using SaveChartToXMLStream or SaveChartToXMLFile, for example:

uses TeeStore;

procedure TForm1.FormCreate(Sender: TObject);
var stream: TMemoryStream;
begin
stream:=TMemoryStream.Create;

try
SaveChartToXMLStream(TCustomChart(Chart1),stream,true,true);
finally
stream.Free;
end
end;

You can also export chart's data to an XML fiile as shown in the features demo and tutorials.
And second question ... Can I use a String which includes the XML stuff and TChart generates the Chart from that?
You can not import full chart settings from XML except you do it manually. However, you can import chart's series and data from an XML file as shown in the All Features\Welcome!\Components\XML Import source example at the new features demo.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply