XML schema validation
XML schema validation is the process of determining whether the structure, content, and data types of an XML document are valid according to an XML schema.
In addition, XML schema validation strips ignorable whitespace from the input document.
There are two ways that you can validate
an XML document:
- Automatically, by including an XML type modifier in the XML column definition in a CREATE TABLE or ALTER TABLE statement. When a column has an XML type modifier, Db2 implicitly validates documents that are inserted into the column or documents in the column that are updated.
- Manually, by executing the DSN_XMLVALIDATE built-in function when you insert a document into an XML column or update a document in an XML column.
Validation is optional when you insert data into an XML column with no XML type modifier. Validation is mandatory when you insert data into an XML column with an XML type modifier.