XML.SQL2XML |
Converts SQL syntax to XML format. The SQL statement must be syntactically and semantically correct. If the SQL statement cannot be parsed, for example if tables or columns used in the SQL statement are not defined, an error is given. Syntax
All parameter names and values are case-insensitive. The required sql-statement value is a quoted string which is the SQL statement to be converted to XML. This contrasts with most other implementations in the XML internal component, where unquoted SELECT statements are passed to the main INVOKE statement. Because sql-statement is a quoted string, each single quote (') within the SQL statement must be escaped by two consecutive single quotes: '':
The optional schema-path value provides a path to an XML schema definition (XSD) file. •If schema-path is specified, its value must be a filepath that leads to a valid schema document, and the "SchemaPath" alias is mandatory. •If schema-path is not specified, no reference to a schema is generated into the XML document. A schema file with extension .xsd is delivered with the USoft product: USoft-installation-folder/xsl/ExtendedConditions/SQL2XML.xsd
To validate the generated XML against this schema, schema-path must be specified. If the optional xml-declaration is set to 'Yes' (the default), an XML declaration is included in the result. This XML declaration shows the default Rules Engine encoding. If xml-declaration is specified, the "XMLDeclaration" alias is mandatory. If xml-declaration is 'No', no XML declaration is returned.
Example
This results in the following XML output:
A complete description of all SQL syntax elements and how they are converted to XML elements and attributes can be found in: USoft-installation-folder\Help\SQL2XML.doc |