Text Format for XML Values | XML Data Type | Teradata Vantage - 17.10 - Text Format for XML Values - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - XML Data Type

Advanced SQL Engine
Teradata Database
Release Number
July 2021
Last Update
Content Type
Programming Reference
Publication ID
English (United States)
Last Update

XML is a markup language; therefore, data or text is marked up with tags that represent metadata that makes the XML self-describing. The universally recognized XML markup scheme is text-based.

Teradata drivers support a text-based format for XML values. A client application or driver that uses the text format might require access to an XML parser to be able to parse the XML received on the wire.

The text format returns the XML serialization of the XML value. XML values retrieved in the text format are encoded in UTF-8. The following shows an example of document retrieval.
<?xml version="1.0" encoding="UTF-8"?>
   <Name>John Hancock</Name>
   <Address>100 1st Street One City, CA 12345</Address>
   <order Number="NW-01-16366" Date="Feb/28/2001">
      <Contact>Mary Shannon</Contact>
      <ShipTo>Widgets Inc., 123 Regency Parkway, Portland, OR 43211</ShipTo>
      <item ID="001">

For the text format, the server will not try to pretty-print the XML value when serializing it for transfer to the client. If the client application needs to display the XML, it is up to the application to decide whether to do pretty-printing, provide syntax-highlighting, or other display options.