Example: Using XMLPARSE With the DOCUMENT and PRESERVE WHITESPACE Clauses

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
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>