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: TStringArray 
Declaration: procedure SaveAsXMLFile (FName: string; DataID: string);

The method SaveAsXMLFile stores the contents of the string array 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 <strarray> tag. For a detailed description of the generated tags please see the method WriteToOpenXMLFile.

Please note that the data of the string array is stored using the current sort order. Thus it is recommended to perform an UnSort before saving the data.

Example: Following is a sample XML code generated by SaveAsXMLFile. The parameter DataID has been set to 'TestSArray':

<?xml version= "1.0"?> 
<!--TReportListView / SDLComponent Suite--> 
<strarray sig="SDLCSuite" vers="1.0" id="TestSArray"> 
<cell ix="1" iy= "1">1</cell> 
<cell ix="3" iy="1">Hayek</cell> 
<cell ix="1" iy="2">2</cell> 
<cell ix= "2"iy="2"></cell> 
<cell ix="3" iy="2">Miller</cell> 
<cell ix="1" iy="3">3</cell><cell ix="3" iy="3">Arsenna</cell> 
<cell ix="4" iy="3">Richmond, California</cell><cell ix="1" iy="5">5</cell> 
<cell ix="2" iy="5">Jack</cell> 
<cell ix="1" iy="10">10</cell> 
<cell ix="2" iy="10">Morgan</cell><cell ix="3" iy="10">Maltese</cell> 
<cell ix="1" iy="13">13</cell> 
<cell ix="2" iy="13">Dave</cell> 
<cell ix="4" iy="13">Taipei, Taiwan</cell> 

Last Update: 2012-Oct-20