XMLSERIALIZE

Teradata Vantageā„¢ XML Data Type

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1140-162K

Purpose

Serializes an XML value to its string representation.

Syntax



DOCUMENT
The XML value is an XML document node.
CONTENT
The XML value is an XQuery document node.
XML_value_expr
An instance of the XML type.
data_type
VARCHAR, CLOB, VARBYTE, or BLOB. If data_type is VARCHAR or CLOB, you can specify the character set as LATIN or UNICODE.
XML_encoding_name

An identifier for encodings such as ISO-8859-1 that are supported by Teradata Database.

You can specify the XML encoding specification only if the data type requested is VARBYTE or BLOB.

See Encoding Names Supported by Teradata XML.

WITH [ NO ] BOM

Whether or not a byte order mark should be added to the result.

The WITH BOM directive produces a byte order mark in these cases:
  • Target type is VARBYTE or BLOB and the encoding is a Unicode encoding (UTF-8, UTF-16, or UTF-32/UCS4)
  • Target type is VARCHAR or CLOB with the UNICODE CHARACTER SET and the client character set is UNICODE

In all other cases, the WITH BOM directive will not produce a byte order mark.

You should specify the WITH BOM option only with UNICODE client character sets.

VERSION 'char_str_literal'
The XML version to which the serialization conforms. Valid values:
  • '1.0'
  • '1.1'

If not specified or if an invalid value is specified, the default is '1.0'.

INCLUDING XMLDECLARATION or EXCLUDING XMLDECLARATION
Whether or not the XML declaration (<?xml..?>) occurs at the beginning of the serialization.
NO INDENT
Specifies no indentation.
INDENT [SIZE = integer]
Specifies indentation and the amount of indentation. The default size is 4.