XML Publishing | XML Data Type | Teradata Vantage - XML Publishing - Teradata Vantage - Analytics Database

XML Data Type

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Publication Date
June 2022
Content Type
Data Types
SQL Reference
Publication ID
B035-1140-172K
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
tkc1628112506748.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
ft:sourceId
dita
dita:id
dgs1472251600184
lifecycle
latest
Product Category
Teradata Vantageā„¢

XML publishing is the process of formatting the results of an SQL query as XML. SQL query results are mapped to an XML format according to a mapping specification provided by the user.

To publish XML from Vantage, perform the following tasks:

  1. Define the SQL query whose output you want to publish as XML.
  2. Define a mapping from the SQL query results to the desired XML structure.
  3. Store the mapping so that it can be easily referenced, for example, in a stylesheet repository table.
  4. Call one of the XML publishing stored procedures (XMLPUBLISH or XMLPUBLISH_STREAM) with the following arguments:
    • The SQL query you defined in step 1
    • The mapping you saved in step 3

You define the XML publishing mapping as an XSLT stylesheet that defines a transformation from the canonical representation of the query result to the desired XML output structure.

If you pass NULL as the Xslt (mapping definition) argument to XMLPUBLISH or XMLPUBLISH_STREAM, the stored procedures will return the canonical XML representation as output.