Difference between revisions of "XML"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
{{YLM to tidy up}}
+
Extensible Markup Language (XML) allows data and data structures to be defined in an agreed format so that they can be shared.  The Recital 4GL and Recital SQL provide commands to export Recital data in XML format and import XML data into Recital format.  The Recital 4GL also includes a series of functions for accessing XML files and their associated Document Type Definition (DTD) files.
=Extensible Markup Language (XML)=
+
  
Extensible Markup Language allows data and data structures to be defined in an agreed format so that they can be shared.  The Recital 4GL and Recital SQL provide commands to export Recital data in XML format and import XML data into Recital format.  The Recital 4GL also includes a series of functions for accessing XML files and their associated Document Type Definition (DTD) files.
 
  
Format of XML files
+
==Format of XML files==
  
The format for XML files can be either RECITAL or ADO (Microsoft® ActiveX® Data Objects). Any XML files created in the ADO format can be loaded with the Open method of an ADO Recordset object.  
+
 
The default XMLFORMAT setting is ADO. The default XMLFORMAT setting can be changed using the SET XMLFORMAT command or overridden using the FORMAT clause on the SQL SELECT statement.
+
The format for XML files can be either RECITAL or ADO (Microsoft® ActiveX® Data Objects). Any XML files created in the ADO format can be loaded with the Open method of an ADO Recordset object.
 +
 +
The default XMLFORMAT setting is ADO. The default XMLFORMAT setting can be changed using the [[SET XMLFORMAT]] command or overridden using the FORMAT clause on the [[SQL SELECT]] statement.
  
 
Note: The XMLFORMAT setting determines whether Recital creates an accompanying DTD file when creating XML files. A DTD file is only created when XMLFORMAT is set to Recital.
 
Note: The XMLFORMAT setting determines whether Recital creates an accompanying DTD file when creating XML files. A DTD file is only created when XMLFORMAT is set to Recital.
  
* SET XMLFORMAT - Toggle XML file format (RECITAL/ADO).
+
* [[SET XMLFORMAT]] - Toggle XML file format (RECITAL/ADO).
 +
 
 +
 
 +
==Exporting Recital data in XML format==
 +
 
 +
 
 +
* [[COPY TO|COPY TO ... TYPE XML]] - The COPY TO command allows records from the active table to be copied out in XML format (RECITAL/ADO).
 +
* [[SQL SELECT|SELECT ... SAVE AS XML]] - The Recital/SQL SELECT command allows data from one or more tables or views to be saved in XML format (RECITAL/ADO).
 +
* [[FETCH|FETCH ... INTO XML]] - The Recital/SQL FETCH command allows individual rows from a SELECT statement to be saved into a RECITAL XML format file.
 +
 
  
 +
==Importing XML data into Recital format==
  
==Exporting Recital Data in XML Format==
 
  
* COPY TO ... TYPE XML - The COPY TO command allows records from the active table to be copied out in XML format (RECITAL/ADO).  
+
* [[SQL CREATE|CREATE TABLE...FROM XML]] - The Recital/SQL UPDATE command allows a Recital table to be created from a structure or structure and data from an ADO XML format file.  
* SELECT ... SAVE AS XML - The Recital/SQL SELECT command allows data from one or more tables or views to be saved in XML format (RECITAL/ADO).  
+
* [[SQL INSERT|INSERT...FROM XML]] - The Recital/SQL UPDATE command allows a Recital table to be updated with data from an ADO XML format file.  
* FETCH ... INTO XML - The Recital/SQL FETCH command allows individual rows from a SELECT statement to be saved into a RECITAL XML format file.  
+
* [[SQL UPDATE|UPDATE ... FROM XML]] - The Recital/SQL UPDATE command allows a Recital table to be updated with data from a RECITAL XML format file.
  
Importing XML Data into Recital Format
 
  
* CREATE TABLE...FROM XML - The Recital/SQL UPDATE command allows a Recital table to be created from a structure or structure and data from an ADO XML format file.
+
==Functions for accessing XML and DTD files==
* INSERT...FROM XML - The Recital/SQL UPDATE command allows a Recital table to be updated with data from an ADO XML format file.
+
* UPDATE ... FROM XML - The Recital/SQL UPDATE command allows a Recital table to be updated with data from a RECITAL XML format file.
+
  
Functions for Accessing XML and DTD files
 
  
* XMLCOUNT() - Function to return the number of records from an XML file.  
+
* [[XMLCOUNT()]] - Function to return the number of records from an XML file.  
* XMLCREATEDTD() - Function to create a Document Type definition file for a particular table.
+
* [[XMLCREATEDTD()]] - Function to create a Document Type definition file for a particular table.
* XMLFIRST() - Function to read the first record contained in the specified XML file.
+
* [[XMLFIRST()]] - Function to read the first record contained in the specified XML file.
* XMLNEXT() - Function to read the next record contained in the XML file specified with the XMLFIRST() function.
+
* [[XMLNEXT()]] - Function to read the next record contained in the XML file specified with the XMLFIRST() function.
* XMLVALIDATE() - Function to return the number of records from an XML file.
+
* [[XMLVALIDATE()]] - Function to return the number of records from an XML file.
  
  

Revision as of 14:52, 25 March 2009

Extensible Markup Language (XML) allows data and data structures to be defined in an agreed format so that they can be shared. The Recital 4GL and Recital SQL provide commands to export Recital data in XML format and import XML data into Recital format. The Recital 4GL also includes a series of functions for accessing XML files and their associated Document Type Definition (DTD) files.


Format of XML files

The format for XML files can be either RECITAL or ADO (Microsoft® ActiveX® Data Objects). Any XML files created in the ADO format can be loaded with the Open method of an ADO Recordset object.

The default XMLFORMAT setting is ADO. The default XMLFORMAT setting can be changed using the SET XMLFORMAT command or overridden using the FORMAT clause on the SQL SELECT statement.

Note: The XMLFORMAT setting determines whether Recital creates an accompanying DTD file when creating XML files. A DTD file is only created when XMLFORMAT is set to Recital.


Exporting Recital data in XML format

  • COPY TO ... TYPE XML - The COPY TO command allows records from the active table to be copied out in XML format (RECITAL/ADO).
  • SELECT ... SAVE AS XML - The Recital/SQL SELECT command allows data from one or more tables or views to be saved in XML format (RECITAL/ADO).
  • FETCH ... INTO XML - The Recital/SQL FETCH command allows individual rows from a SELECT statement to be saved into a RECITAL XML format file.


Importing XML data into Recital format

  • CREATE TABLE...FROM XML - The Recital/SQL UPDATE command allows a Recital table to be created from a structure or structure and data from an ADO XML format file.
  • INSERT...FROM XML - The Recital/SQL UPDATE command allows a Recital table to be updated with data from an ADO XML format file.
  • UPDATE ... FROM XML - The Recital/SQL UPDATE command allows a Recital table to be updated with data from a RECITAL XML format file.


Functions for accessing XML and DTD files

  • XMLCOUNT() - Function to return the number of records from an XML file.
  • XMLCREATEDTD() - Function to create a Document Type definition file for a particular table.
  • XMLFIRST() - Function to read the first record contained in the specified XML file.
  • XMLNEXT() - Function to read the next record contained in the XML file specified with the XMLFIRST() function.
  • XMLVALIDATE() - Function to return the number of records from an XML file.