type
XML
PostgreSQL XML stores well-formed XML content or documents; the type does not imply validation against an XML schema. Example target: PostgreSQL 17. Run in a disposable database; examples need no existing tables.
Formal Syntax & Structure
sql syntaxsql
XMLWorking Example
Example Snippetsql
SELECT CAST(XMLPARSE(DOCUMENT '<note>Hi</note>') AS TEXT);