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 16 XML Validation: XML instance must be a document.

(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 ('An error occurred');

b.

INSERT INTO ErrorLog VALUES('An error occurred' xml);

c.

UPDATE ErrorLog VALUES('An error occurred');

d.

INSERT INTO ErrorLog VALUES('An error occurred');

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!