The XML SQL2XML Method |
The XML SQL2XML method 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 INVOKE XML.SQL2XML WITH SELECT <SQL statement> SQLStatement [,<schema path> SchemaPath] [FROM] PARAMETERS The parameter names and values are not case-sensitive.
EXAMPLE INVOKE XML.SQL2XML WITH SELECT 'SELECT * FROM TOUR' SQLStatement, 'C:\Program Files\USD70\xsl\ExtendedConditions\SQL2XML.xsd' This results in the generation of the schema path in the XML file: <?xml version="1.0" encoding="Windows-1252"?> <SqlNode version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "C:\Program Files\USD70\xsl\ExtendedConditions\SQL2XML.xsd"> <Select> <SelectList> <SelectListElement position="1"> <Column name="*" table_name="TOUR" table_info_window_name="Tours" position="1"/> </SelectListElement> </SelectList> <TableList> <TableListElement name="TOUR" info_window_name="Tours" position="1"/> </TableList> </Select> </SqlNode> A complete description of all SQL syntax elements and how they are converted to XML elements and attributes can be found in: C:\<USoft installation folder>\Help\SQL2XML.doc |