XML Output Description

Previous Next

See Also

<SQLXMLExport> is the starting element of XML.SQLExport.

<Meta> element contains meta information of the SQL statement. Only the <OutputExpressions> element occurs in the statement. The <OutputExpressions> element contains all expressions of the output list of the SELECT statement. Each expression is presented as a separate element. If the expression is a table column a <Column> element occurs, otherwise an <Expression> element will occur.

The <Column> element has the following attributes:

· TableName (mandatory)

 

· TableAlias (optional)

 

· Name (mandatory)

 

· Alias (if not provided, will be allocated by USoft)

The <Expression> element has the following attributes:

· Alias (mandatory)

The value of the expression will contain the SQL expression itself.

The <Rows> element contains all the exported data. There is one <Row> element for each record from the resulting record set. If the result of the select has n records then there will be n <Row> children of the <Rows> element.

The number of <Field> children of the <Row> element is equal to the number of expressions in the output list of the SELECT statement.

The Alias attribute value from the <Field> element contains the alias of the current output expression. The attribute is mandatory.

SQLExport can still export data if there is no table in the FROM clause of the SELECT statement. In that case the <OutputExpressions> element will not contain any <Column> elements, but only <Expression> elements.

If there is a SetSelect statement under the invoke instead of a normal SELECT, then the <OutputExpressions> element will not contain any <Column> elements, but only <Expression> elements.

The order of the columns in the SELECT list determines the order of the elements within the <OutputExpressions> element and also the <Field> elements within the <Row> element.

The optional ORDER BY clause determines the order of the <Row> elements in the XML output.

If there are no records selected, the XML output contains only the root element, the <Meta> element and the <Rows> element. It will not contain any <Row> elements.