Exports data to the USoft XML single-table format on the basis of a SELECT statement.
Syntax
INVOKE XML.Export WITH
SELECT value parameter
, expression
FROM table
ORDER BY order-by-list
expression ::=
{ column |
OLD( column ) |
* |
OLD( * ) }
|
The required SELECT output-list must contain at least 1 item. It is made up of 0 or more value-parameter pairs and 0 or more (SQL) expressions. The possible values for value parameter-name are listed in the Parameters table below.
In expression, other SQL functions than OLD() are NOT supported.
It is customary, but not mandatory, to list value parameter pairs before expressions. The order of the expressions in the SELECT output-list determines the order of the attributes in the XML output. The optional ORDER BY clause determines the document order of the records in the XML output.
The required FROM clause must contain the name of exactly 1 table or logical view.
Example
INVOKE XML.Export WITH
SELECT 'yes' UseIOFormats
, *
FROM tour
|
Parameters
This table lists all value-parameter pairs supported in the SELECT output-lists passed to XML.Export. The use of each parameter is optional. If you do not specify a given parameter and it has a default value corresponding to it, this is the value applied.
Both values and parameter are case-insensitive.
value
|
parameter
|
Description
|
{ yes | no }
|
AppendToFile
|
Value is a string and must be quoted, as in the example earlier in this help topic.
This parameter is used with the "WriteOutputTo" parameter. If you specify 'yes' for this parameter, the file is appended to. Otherwise, it is overwritten.
|
{ yes | no }
|
ConvertWhiteSpaces
|
Value is a string and must be quoted, as in the example earlier in this help topic.
If you specify 'yes' for this parameter, then tab characters, spaces, newline characters and carriage returns/line feeds are converted to 	   
 and 
 respectively. When the resulting XML document is imported using XML Import, the converted values are switched back into tab characters, spaces, newline characters and CR/LFs.
|
header-line-name
|
DTDName
|
This parameter is used to specify a header line in the XML output with a DOCTYPE declaration containing the DTD Name as reference. See "Document Type Definition (DTD) Specification" for more information.
|
{ yes | no }
|
EmptyDocOnZeroRows
|
Value is a string and must be quoted, as in the example earlier in this help topic.
If set to 'no' (the default), if the SELECT statement of the XML export does not return any rows, USoft returns an empty string. This makes it difficult to apply any transformation on the result of the XML export.
If set to ‘yes’, then the output is always an XML document. If no rows are returned, this XML document contains only a root tag with the same name as the info window name.
|
{ Insert | Delete | Update }
|
ExecutionType
|
Value is a string and must be quoted, as in the example earlier in this help topic.
Specifies a sub element that will be generated for each resulting row element. This way you can generate XML output with specifications for import actions.
|
{ yes | no }
|
UseIOFormats
|
Value is a string and must be quoted, as in the example earlier in this help topic.
If you specify 'yes' for this parameter, column values in the resulting XML output get the IO format of the corresponding domain. Otherwise they are written as they are retrieved from the database.
|
USFile-alias
output-file-name
|
WriteOutputTo
|
This parameter is used to specify that the output is to be written directly to a file. It is possible to use a file which has previously been opened using the USFile.Open method. To do this, the alias used in the USFile.Open method must be specified, preceded by 'USFile.' If no USFile alias is specified, the XML will be written directly to the file specified. If the file exists, it will be overwritten. To prevent this, use the 'Append' parameter. If specified, the method will return the file name.
|
{ yes | no }
|
XmlDeclaration
|
Value is a string and must be quoted, as in the example earlier in this help topic.
If you specify 'yes' for this parameter, the default Rules Engine encoding is returned in XML processing instructions. Otherwise no encoding processing instruction is added to the returned XML document.
|
See also
USoft XML format
Single-table XML documents
Example: Simple XML export
Example: XML export with DTD name and IO formats
Example: XML export for update
Example: XML export in combination with USFile
|