The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: TDataTable
Declaration: procedure SaveAsXMLFile (FName: string; Precision: integer; DataID: string);

The method SaveAsXMLFile stores the contents of the data table as an XML file on the disk. The parameter FName specifies the name of the file to be generated, the parameter DataID holds a unique identifier which is stored as the attribute "id" of the <datatable> tag. The parameter Precision control the number of decimal places used to store the data.

Example: Following is a sample XML code generated by SaveAsXMLFile. The parameter DataID has been set to 'DataLab', the Precision parameter was set to 7:

<?xml version="1.0"?>

<datatable sig="SDLCSuite" vers="1.0" id="DataLab">
<!-- TDataTable / SDL Component Suite -->
<comment>Source positions of some European mineral waters</comment>
<size cols="2" rows="6" />
<colnames default="">
<col ix="1">Latitude</col>
<col ix="2">Longitude</col>
<rownames default="">
<row ix="1">Astoria</row>
<row ix="2">Avra</row>
<row ix="3">Chaudfontaine</row>
<row ix="4">Donat</row>
<row ix="5">Evian</row>
<row ix="6">Fonte Guizza</row>
<colattrib default="0">
<rowattrib default="0">
<datacells default="0">
<cell col="1" row="1">  47.4210000</cell>
<cell col="2" row="1">  11.8330000</cell>
<cell col="1" row="2">  38.2500000</cell>
<cell col="2" row="2">  22.0830000</cell>
<cell col="1" row="3">  50.5830000</cell>
<cell col="2" row="3">   5.6330000</cell>
<cell col="1" row="4">  46.2200000</cell>
<cell col="2" row="4">  15.6200000</cell>
<cell col="1" row="5">  46.3830000</cell>
<cell col="2" row="5">   6.5830000</cell>
<cell col="1" row="6">  45.5710000</cell>
<cell col="2" row="6">  12.1080000</cell>

Last Update: 2014-Sep-11