Page 1 of 1

.TEN file content in an XML file

Posted: Wed Apr 19, 2006 1:58 pm
by 9637394
I want to extract the content from a TEN file and insert it into an XML file on a single node e.g as binary data.

Is there an easy way to do this?

Posted: Wed Apr 19, 2006 2:18 pm
by narcis
Hi Michael,

Yes, you can do something like this:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      line1.FillSampleValues();
      tChart1.Export.Template.Save("test.ten");
    }

    private void button1_Click(object sender, EventArgs e)
    {
      tChart1.Clear();

      tChart1.Import.Template.Load("test.ten");

      Steema.TeeChart.Export.DataExport dataExport = new Steema.TeeChart.Export.DataExport(tChart1.Chart); 
      dataExport.XML.IncludeHeader = true; 
      dataExport.XML.IncludeIndex = true; 
      dataExport.XML.IncludeLabels = true; 
      dataExport.XML.Series = line1; 
      dataExport.XML.Save("test.xml");
    }