Question: Code example 18-1 16 XML Validation: XML instance must be a document. (Refer to code example 18-1.) Which of the following statements could you use
Code example 18-1
(Refer to code example 18-1.) Which of the following statements could you use to determine if the @ErrorData variable contains the ErrorMessage element? Assume that the @ErrorData variable is declared with the xml data type and that it contains the XML data shown in the example.
| a. | IF @ErrorData.exist('/Error/ErrorMessage') = 1 | |
| b. | IF @ErrorData.exist('ErrorMessage') | |
| c. | IF @ErrorData('/Error/ErrorMessage').exist = 1 | |
| d. | IF @ErrorData('ErrorMessage').exist |
2.
Which method would you use to split the nodes of the current xml data type into rows?
| a. | query | |
| b. | modify | |
| c. | value | |
| d. | nodes |
3.
What can you call an element that contains other elements?
| a. | parent element | |
| b. | super element | |
| c. | sub element | |
| d. | child element |
4.Which of the following INSERT statements inserts a row into a table named ErrorLog that consists of an identity column and a column that contains XML data?
| a. | INSERT INTO ErrorLog (' | |
| b. | INSERT INTO ErrorLog VALUES(' | |
| c. | UPDATE ErrorLog VALUES(' | |
| d. | INSERT INTO ErrorLog VALUES(' |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
