Purpose
EXISTSNODE() checks whether an XML variable contains the specified XPath node.
Syntax
EXISTSNODE(XMLType_instance, XPath_string [, namespace_string ])
Parameters
| Parameter | Description |
|---|---|
| XML_Type_instance | The input XML variable. |
| XPath_string | The XPath string. |
| namespace_string | Optional. The default mapping or namespace mapping of the prefix. |
Return type
1is returned if the specified XPath node exists.0is returned if the specified XPath node does not exist.
Examples
Parse the input XML string and verify whether it contains the specified node.
obclient> select existsnode(xmltype('<a><b>aaa</b><b>bbb</b></a>'), 'a/b');