These statements perform a validating parse on the XML document in the customerXML column using the schema with schemaid customerschema.xsd. If the document is valid, the fast infoset representation of the document is updated with type information.
UPDATE customer SET customerXML = customerXML.CREATESCHEMABASEDXML( (SELECT schemacontent FROM schematab WHERE schematab.schemaid='customerschema.xsd')) WHERE customerID = 1;