Home | Sign in | English EN

  • Exporting the query content
  • Exporting a single record
  • Array items
  • Miscellaneous
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
<Source>.ExportXML (Function)
In french: <Source>.ExporteXML
ODBCNative Connectors (Native Accesses)Not available with these kinds of connection
Exports the records found in a data file (HFSQL or OLE DB), view or query to an XML file.
Remark: A style sheet (".XLS" file) is automatically generated when creating the XML file. Remark: From version 19, HFSQL is the new name of HyperFileSQL.
// Export all customers
Customer.ExportXML("C:\TEMP\Customer.xml", hExpCreation)
<Result> = <Source>.ExportXML([<Path of XML file> [, <Items to export>]] [, <Options> [, <Progress Bar>]])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<Source>: Type corresponding to the specified source
Name of data file, view or query used.
<Path of XML file>: Optional character string
Full path of XML file to generate.
If this parameter is not specified, a <Source>.XML file will be generated in the current directory.
<Items to export>: Optional character string
List of names of items to export. The names are delimited by single quotes and separated by commas or CR characters. The names of composite key items, binary items and binary memo items are ignored.
If this parameter corresponds to an empty string (""), all the items in the data file (except composite key, binary and binary memo items) are exported.
<Options>: Optional Integer constant
Mode for creating the XML file:
hExpCreationIf the XML export file already exists, it is overwritten. An error occurs if this option is not specified and if the XML file exists.
hExpBreakableThe export can be interrupted by pressing Esc.
If the export is interrupted, the XML file is valid and it only contains the records exported before the interruption.
(default value)
Standard operating mode.
hExpWithoutXSLThe style sheet (".XSL" file) is not created.
<Progress Bar>: Optional control name or window name
Name of Progress Bar control or name of window used to show the progress of file creation.

Exporting the query content

To export the query content, you must initialize the query (HExecuteQuery) before using <Source>.ExportXML.

Exporting a single record

To export a single record to an XML string, use <Source>.RecordToXML.

Array items

If one of the exported items is an array item, each element of the array item is exported in a new level:
<ITEM1>data of item 1</ITEM1>
<ITEM2>data of item 2</ITEM2>
<ARRITEM_1>data of element 1</ARRITEM_1>
<ARRITEM_2>data of element 2</ARRITEM_2>
<ARRITEM_3>data of element 3</ARRITEM_3>

Reminder: Composite key, binary memo or binary items are ignored.


The document entity of the generated XML file is named HF_DOCUMENT.
Component: wd270hf.dll
Minimum version required
  • Version 25
This page is also available for…
Click [Add] to post a comment