SQL/XML is an XML extension of the Structured Query Language, which allows you to retrieve relational data using extended SQL syntax, and produce an XML result. SQL/XML has five main elements:
The main SQL/XML functions are the following:
XMLELEMENT - to edit an element with a name, a list of attributes (optional) and a list of values (optional)
XMLATTRIBUTES - to edit a list of attributes with names and values
XMLAGG - to edit in multiple rows a concatenation of elements, from a single XML value corresponding to a single column
XMLCONCAT - to edit in the same row a concatenation of elements, from several XML values corresponding to several columns
XMLFOREST - to edit in the same row a concatenation of elements, from several SQL values corresponding to several columns. The name and value of a column become the name and value of an element
An XML model allows you to generate SQL/XML queries for global elements, whatever the targeted XML language (XSD, DTD or XDR). You need first to map an XML model to a PDM, then to attach the SQL/XML extended model definition to the mapped XML model.
The best way to map an XML model to a PDM is to use the XML Builder Wizard from a PDM. The generated XML model is automatically mapped to the PDM and linked with the SQL/XML extended model definition. If need be, you can still modify the mapping through the Mapping tab of elements and complex types property sheets.
For more information on the XML Builder Wizard, see Generating an XML model via the XML Builder Wizard, in the Working with Data Models chapter of the Data Modeling guide.
Generated SQL/XML queries cannot be parameterized.
The following procedure assumes you have an XML model open in the workspace and mapped to a PDM.