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....



WriteToOpenXMLFile


Unit:SDL_replist
Class: TRLData
Declaration: procedure WriteToOpenXMLFile (var OutFile : TextFile; CreateHeader: boolean; DataID: string);

The method WriteToOpenXMLFile writes the contents of the TRLData structure to an open text file OutFile using XML syntax. If the parameter CreateHeader is TRUE a minimum XML header is generated. CreateHeader should be set to a FALSE value if the data is to be appended to an existing XML file. The parameter DataID holds a unique identifier which is stored as the attribute "id " of the <replist> tag. If the parameter DataID is empty, the value of the property DataID is used instead of an empty string.

Please note that the data is stored using the current sort order (which may differ from the original one). Thus it is recommended to perform an UnSort before saving the data.

WriteToOpenXMLFile generates the following tags:

XML Tag Description
<replist> the root element of the TRLData structure. It contains the following attributes:

sig       signature; is always "SDLCSuite"
vers     version string
id         name of TRLData structure as defined by the parameter DataID

example:

 <replist sig="SDLCSuite" vers="1.0" id="TestRepList">
<numcols> specifies the number of columns

example:

<numcols>4</numcols>
<numrows> specifies the number of rows

example:

<numrows>13</numrows>
<comment >

contains an arbitrary comment on the data

example:

<comment>This is a comment on the data</comment>
<commonheader >

specifies the common table header

example:

<commonheader>SDL Report Data</commonheader>
<colname >

specifies a column header; the attribute ix specifies the number of the column

example:

<colname ix="4">Address</colname>
<columnformat >

specifies the column format for the row editor; the attribute ix specifies the number of the column

example:

<columnformat ix="1">[i][120]0001</columnformat>
<checkedcolumn> identifies a checked column; the tag is always empty; a column is checked if the tag is present ix column number

example:

<checkedcolumn ix="3" />
<cell > cell contents

ix                   column index of the cell
iy                   row index of the cell
checked="" indicates that this cell is checked (unchecked cells do not export the checked attribute)

example:

<cell ix="2" iy="3" checked="">Test Cell 2,3</cell>

Hint: For a sample XML file, see the description of the method SaveAsXMLFile.



Last Update: 2012-Oct-20