|
|
|
|
|
- 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
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, launch the import wizard: in the "Analysis" pane, in the "Creation" group, pull down "Import" and select "Import file/table descriptions".
- 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.
- 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  . 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:
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). 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|