Which XML method should you use?

Posted by: Pdfprep Category: 70-461 Tags: , ,

You are working with a table that has an XML column that contains information about books. Each book may have an associated price. You need to write a query that returns each author on a separate row in XML format.

Which XML method should you use?
A . Value()
B . Nodes()
C . Query()
D . Exist()

Answer: B

Explanation:

The nodes() method is useful when you want to shred an xml data type instance into relational data. It allows you to identify nodes that will be mapped into a new row.

The result of the nodes() method is a rowset that contains logical copies of the original XML instances. In these logical copies, the context node of every row instance is set to one of the nodes identified with the query expression, so that subsequent queries can navigate relative to these context nodes.

Leave a Reply

Your email address will not be published.