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?
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.
A: The Value() method performs an XQuery against the XML and returns a value of SQL type. This method returns a scalar value.
C: The Query() method specifies an XQuery against an instance of the xml data type. The result is of xml type. The method returns an instance of untyped XML.
D: The Exists() method 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.