xml Data Type Methods
You can use the xml data type methods to query an XML instance stored in a variable or column of xml type. The topics in this section describe how to use the xml data type methods.
In This Section
Topic |
Description |
---|---|
Describes how to use the query() method to query over an XML instance. |
|
Describes how to use the value() method to retrieve a value of SQL type from an XML instance. |
|
Describes how to use the exist() method to determine whether a query returns a nonempty result. |
|
Describes how to use the modify() method to specify XML Data Modification Language (XML DML)statements to perform updates. |
|
Describes how to use the nodes() method to shred XML into multiple rows, which propagates parts of XML documents into rowsets. |
|
Describes how to bind non-XML data inside XML. |
|
Describes guidelines for using the xml data type methods. |
You call these methods by using the user-defined type method invocation syntax. For example:
SELECT XmlCol.query(' ... ')
FROM Table
Note
The xml data type methods query(), value(), and exist() return NULL if executed against a NULL XML instance. Also, modify() does not return anything, but nodes() returns rowsets and an empty rowset with a NULL input.