Example: Using XMLPARSE With the DOCUMENT and PRESERVE WHITESPACE Clauses - Analytics Database - Teradata Vantage

Teradata Vantage™ - XML Data Type - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-01-27
dita:mapPath
tkc1628112506748.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dgs1472251600184
Product Category
Teradata Vantage
SELECT XMLPARSE(DOCUMENT
   '<Customer xml:space="default">
      <Address>Address with lots of space</Address>
      <Address>More space  </Address>
   </Customer>'
   PRESERVE WHITESPACE);

The result of the query is:

XMLPARSE( DOCUMENT '<Customer xml:space="default"> <Address> ...
----------------------------------------------------------------
<Customer xml:space="default">   <Address>Address with lots of space</Address>      <Address>More space  </Address>  </Customer>