You plan to implement a Web-based application that will save XML data to a column in a table. You need to design a query that ensures that before saving the XML data to the table, the data contains valid elements. The solution must be developed by using the minimum amount of effort. What should you include in the query?
A.
.exist()
B.
.query()
C.
FOR XML PATH
D.
sp_xml_preparedocument
Explanation:
exist() Method (xml Data Type)Returns a bit that represents one of the following conditions:
* 1, representing True, if the XQuery expression in a query returns a nonempty result. That is, it returns at least one XML node.
* 0, representing False, if it returns an empty result.
* NULL if the xml data type instance against which the query was executed contains NULL.