16.20 - teradata_optional Attribute
teradata_optional_attributes Attribute - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ XML Data Type

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1140-162K
Language
English (United States)

You can specify the following in the stylesheet:

  • The elements that are optional and will not be serialized if the corresponding value is a NULL
  • The elements that are required. An empty element, <el/>, or attribute with a null string value, at="", is created if the corresponding value is NULL.

Use the teradata_optional attribute to specify whether an element is generated as an empty element with an empty string value, or whether the element is skipped if the corresponding value in the SQL result set is NULL.

Use the teradata_optional_attributes attribute to specify which attribute(s) of the element is skipped if the corresponding value(s) in the SQL result set is NULL.