PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Use conditions
  • Binary Memo column (image)
  • Limit
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Creates an XML file from the data found in a Table or TreeView Table control.
Remarks:
  • By default, a style sheet (".XSL" file) is automatically generated when creating the XML file.
  • The document entity of generated XML file is named WINDEV_TABLE.
Example
WINDEVReports and QueriesUser code (UMC)
sFile is string
// File name
sFile = fSelect("", "", "Choose the export file", ...
"XML files (*.XML) *.xml", "xml", fselCreate + fselExist)
// The export is canceled if no name was specified
// Otherwise, export the content of TABLE_TABLE1
IF sFile <> "" THEN TableToXML(TABLE_TABLE1, sFile, taNoTitle)
WEBDEV - Server codeAjax
sFile is string
// File name
sFile = CompleteDir(fExeDir()) + "MyXML" + ConnectionCount() + ".xml"
// The export is canceled if no name was specified
// Otherwise, export the content of TABLE_TABLE1
IF sFile <> "" THEN TableToXML(TABLE_TABLE1, sFile, taNoTitle)
Syntax
<Result> = TableToXML(<Table control> , <Name of the XML file> [, <Options> [, <Start row> [, <End row>]]])
<Result>: Boolean
  • True if the file was created,
  • False otherwise.
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
<Name of the XML file>: Character strings
Name and full path of XML file to create. The file is replaced with the new file if it already exists.
<Options>: Optional Integer constant
Configures the XML file to create.
taColumnDisplayedOrderExports the columns according to the order of columns currently displayed in the control (and not according to the order of columns defined in the editor).
WEBDEV - Server code This constant is not available.
taColumnsTitles
(default value)
The title of the columns is inserted in the file.
taNoTitleOnly the data is copied to the file.
taNoTotalDoes not export:
  • the rows containing totals, mean and automatic count (these rows are exported by default).
  • WINDEV the rows containing custom calculations (these rows are exported by default).
WEBDEV - Server code This constant is not available.
taNoXSLThe style sheet (".XSL" file) is not created.
taSelectedLinesExports the selected rows only (all the rows are exported by default).
taWithInvisibleColumnsAlso exports the invisible control columns.
WINDEV The columns defined as non printable and non exportable are exported. These columns are defined:
  • programmatically: VisibleInExportAndPrint property set to False.
  • in the "General" tab of the column description window: "Export and print" set to "Never".
<Start row>: Optional integer
Number of the row where the export will start.
If this parameter is not specified, the start row is the first row of the control.
<End row>: Optional integer
Number of the row where the export will end.
If this parameter is not specified, the end row is the last row of the control.
Remarks

Use conditions

TableToXML can be used on:
  • a Table or TreeView Table control based on a data file.
  • a Table or TreeView Table control populated programmatically.
  • a single-selection or multi-selection control.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)Ajax

Binary Memo column (image)

For the Binary Memo columns, the XML file contains an empty string.

Limit

The merged columns are ignored.
Component: wd280std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment