ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL
  • Overview
  • Operations in the data model editor
  • Importing an XML document
  • Analysis generation
  • Use programmatically
  • Browsing the different files of XML document
  • Limitations
  • Queries
  • Creating files
  • Filter
  • Reading XML files
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Native XML Connector
Native Connectors (Native Accesses)Available only with this kind of connection
Warning
From version 27, it is no longer possible to import XML files into the analysis. To handle XML files, it is recommended to use variables of type xmlDocument. For more details, see Management of XML.
Overview
WINDEV and WEBDEV allow you to import and handle a definition of XML files via the data model editor.
The method for handling the XML files is the same as the method for handling the standard HFSQL data files.
Operations in the data model editor

Importing an XML document

To import the structure of an XML document into the data model editor:
  1. In the data model editor, launch the import wizard: in the "Analysis" pane, in the "Creation" group, pull down "Import" and select "Import file/table descriptions".
  2. In the wizard that starts:
    • Indicate the type of database: XML
    • Specify whether the data must be migrated to the HFSQL Classic format.
    • Specify the path of the XML document to import.
    • Select the tables of the XML document to import.
  3. Complete the wizard: the various files making up the XML document and their tree structure are automatically displayed in the data model editor.

Analysis generation

To create windows or pages manipulating the XML document described in the analysis, the analysis must be generated: under the "Analysis" pane, in the "Analysis" group, click on Generation icon.
Use programmatically

Browsing the different files of XML document

The structure of an XML document is represented by different files in the data model editor.
To read the content of an XML file, read the content of main file (the parent) then read the content of linked files (the children).
By default, when reading a file, a filter is automatically applied to the linked files in order to only read the records corresponding to the main file.
For example:
Browsing the different files of XML document
When browsing the Person file, it is possible to find out the person's email address.
To do so, all you have to do is position on the "Person" file and apply HReadFirst to the "Email" file.
In this case, the record read in the "Email" file will correspond to the first email associated with the current record in the "Person" file.
If this mechanism is disabled (HDeactivateAutoFilter), the record read in the "Email" file will correspond to the first record found in the Email file (and not to the child of the record read in the "Person" file).
To re-enable the positioning mechanism in the linked files, use HActivateAutoFilter.
Limitations

Queries

The queries are not available for the XML files.

Creating files

The functions for file creation (HCreation and HCreationIfNotFound) are not available for the XML files.

Filter

The following syntax of HFilter is not available for XML files:
<Result> = HFilter(<File name> , <Selection condition>)

Reading XML files

HRead reads the current record only. You cannot specify a record number other than the current one. To specify the current record number, use the hCurrentRecNum constant.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/14/2025

Send a report | Local help