PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Creates an XML file from the data found in a Table or TreeView Table control .
Notes:
  • 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.
Versions 20 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 20
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 23 and later
Linux This function is now available for WEBDEV sites in Linux.
New in version 23
Linux This function is now available for WEBDEV sites in Linux.
Linux This function is now available for WEBDEV sites in Linux.
Example
WINDEVUser 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)
Syntax
<Result> = TableToXML(<Table control> , <Name of XML file> [, <Options> [, <Start row> [, <End row>]]])
<Result>: Boolean
  • True if the file was created,
  • False otherwise.
<Table control>: Control name
Name of control to use. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
<Name of XML file>: Character string (with quotes)
Name and full path of XML file to create. The file is replaced by the new file if it already exists.
<Options>: Optional Integer constant
Configures the XML file to create.
taWithInvisibleColumnsAlso exports the invisible control columns.
Versions 22 and later
WINDEV The columns defined as non printable and non exportable are exported. These columns are defined:
  • by programming: ..VisibleInExportAndPrint set to False.
  • in the "General" tab of the description window of columns: "Export and print" to "Never".
New in version 22
WINDEV The columns defined as non printable and non exportable are exported. These columns are defined:
  • by programming: ..VisibleInExportAndPrint set to False.
  • in the "General" tab of the description window of columns: "Export and print" to "Never".
WINDEV The columns defined as non printable and non exportable are exported. These columns are defined:
  • by programming: ..VisibleInExportAndPrint set to False.
  • in the "General" tab of the description window of columns: "Export and print" to "Never".
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).
taSelectedLinesExports the selected rows only (all the rows are exported by default).
taNoTitleOnly the data is copied into the file.
taNoTotalDoes not export:
  • the rows containing totals, mean and automatic count (these rows are exported by default).
  • Versions 22 and later
    WINDEV the rows containing custom calculations (these rows are exported by default).
    New in version 22
    WINDEV the rows containing custom calculations (these rows are exported by default).
    WINDEV the rows containing custom calculations (these rows are exported by default).
taNoXSLThe style sheet (".XSL" file) is not created.
taColumnsTitles
(default value)
The title of columns is inserted into the file.
<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 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 control.
Remarks

Use conditions

TableToXML can be used on:
  • a browsing or memory control.
  • a single-selection or multiselection control.
WINDEVUser code (UMC)

Binary Memo column (image)

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

Limit

The merged columns are ignored.
Component : wd240std.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Video TabletoXml
https://youtu.be/FF6holAHPd0

https://windevdesenvolvimento.blogspot.com/2019/02/dicas-2015-windev-tabela-91-tabletoxml.html

TableToXML(TABLE_WIN_TABELA_EXEMPLO,"EXEMPLO.XML")
ShellExecute("EXEMPLO.XML")
amarildo
Feb. 13 2019
GERAR XML DE UMA TABELA
sFile is string

// Opens the file picker
sFile = fSelect("", "", "Select a file...", "xml" + TAB + "*.xml", "*.xml", fselCreate + fselExist)


IF sFile <> "" THEN TableToXML(TABLE_descricao, sFile, taNoTitle)

// BLOG COM VIDEO E EXEMPLO
http://windevdesenvolvimento.blogspot.com.br/2017/07/aula-1207-windev-tabela-068-tabletoxml.html

https://www.youtube.com/watch?v=wFWdyUP8-uI


De matos
Jul. 12 2017