PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Exporting the query content
  • Exporting a single record
  • Array items
  • Various
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
HExportXML (Function)
In French: HExporteXML
ODBCNative AccessesNot available with these kinds of connection
Exports the records found in a data file (HFSQL or OLE DB), view or query into an XML file.
Note: A style sheet (".XLS" file) is automatically generated when creating the XML file.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Android Widget This function is now available in Android Widget mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
New in version 22
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Android Widget This function is now available in Android Widget mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Android Widget This function is now available in Android Widget mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Example
// Exports all customers
HExportXML(CUSTOMER, "C:\TEMP\Customer.xml", hExpCreation)
Syntax
<Result> = HExportXML(<File Name> [, <Path of XML File> [, <List of 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.
<File Name>: Character string (with or without quotes)
Name of data file used. If this name is not specified, HExportXML handles the last data file used by the last function for HFSQL management (starting with the letter H).
<Path of XML File>: Optional character string
Full path of XML file to generate.
<List of Items to Export>: Optional character string
List of names of items to export. The names are delimited by single quotes and they are 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 of the data file (except for the composite keys, binary keys and binary memo keys) are exported.
<Options>: Optional constant
Specifies the creation mode of 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 the ESC key.
If the export is interrupted, the XML file is valid and it only contains the records exported before the interruption.
hExpNormal
(default value)
Standard operating mode.
hExpWithoutXSLThe style sheet (".XSL" file) is not created.
<Progress bar>: Optional character string (with or without quotes)
Name of Progress Bar control or name of window used to show the progress of file creation.
Remarks

Exporting the query content

To export the query content, you must initialize the query (HExecuteQuery) before using HExportXML.

Exporting a single record

To export a single record to an XML string, use HRecordToXML.

Array items

If one of the exported items is an array item, each element of the array item is exported in a new level:
<FILE>
<ITEM1>data of item 1</ITEM1>
<ITEM2>data of item 2</ITEM2>
<ARRITEM>
<ARRITEM_1>data of element 1</ARRITEM_1>
<ARRITEM_2>data of element 2</ARRITEM_2>
<ARRITEM_3>data of element 3</ARRITEM_3>
</ARRITEM>
...
</FILE>
Reminder: The Composite Key items, Binary Memo items or Binary items are ignored.

Various

The document entity of the generated XML file is named HF_DOCUMENT.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment