Usage Notes - Advanced SQL Engine - Teradata Database

XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
amr1556233250442.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1140
lifecycle
previous
Product Category
Teradata Vantageā„¢
You can declare namespaces in two ways:
  1. Declare the namespaces in the query string. For example:
    SELECT CREATEXML('<a xmlns="http://td.com"><b>c</b><b>d</b></a>').XMLEXTRACT('declare namespace td = "http://td.com"; /td:a/td:b', NULL);

    The namespace is declared at the beginning of the query: declare namespace td = "http://td.com"

  2. Specify the namespaces in the nsmap parameter as a string of prefix=namespace_uri declarations with a space separating each namespace declaration. For example:
    SELECT CREATEXML('<a xmlns="http://td.com"><b>c</b><b>d</b></a>').XMLEXTRACT('/td:a/td:b', 'td=http://td.com');