|
|
|
|
- Overview
- Operations in the data model editor
- Importing an XML document
- Generating the analysis
- Use through programming
- Browsing the different files of XML document
- Limitations
- Queries
- Creating files
- Filter
- Reading XML files
Native XML Connector
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.
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: - In the data model editor, start the import wizard: on the "Analysis" tab, in the "Creation" group, expand "Import" and select "Import file/table descriptions...".
- In the wizard that starts:
- Specify the database type: 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.
- Finish the wizard: the different files found in the XML document and their tree structure are automatically represented in the data model editor.
Generating the analysis To create windows or pages that handle the XML document described in the analysis, the analysis must be generated: on the "Analysis" tab, in the "Analysis" group, click . 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:
The email of this person can be retrieved when browsing the Person file. 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). Queries The queries 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|