Existsnode In Pl/Sql What Is The Assignment Operator

EXISTSNODE

Syntax


Description of the illustration existsnode.gif

Purpose

determines whether traversal of an XML document using a specified path results in any nodes. It takes as arguments the instance containing an XML document and a XPath string designating a path. The optional must resolve to a value that specifies a default mapping or namespace mapping for prefixes, which Oracle Database uses when evaluating the XPath expression(s).

The argument defaults to the namespace of the root element. If you refer to any subelement in , then you must specify , and you must specify the "who" prefix in both of these arguments.

The return value is :

  • 0 if no nodes remain after applying the XPath traversal on the document

  • 1 if any nodes remain

Examples

The following example tests for the existence of the node in the XML path of the column of the sample table :

SELECT warehouse_id, warehouse_name FROM warehouses WHERE EXISTSNODE(warehouse_spec, '/Warehouse/Docks') = 1 ORDER BY warehouse_id, warehouse_name; WAREHOUSE_ID WAREHOUSE_NAME ------------ ----------------------------------- 1 Southlake, Texas 2 San Francisco 4 Seattle, Washington

EXISTSNODE

Syntax


Description of the illustration existsnode.gif

Purpose

determines whether traversal of an XML document using a specified path results in any nodes. It takes as arguments the instance containing an XML document and a XPath string designating a path. The optional must resolve to a value that specifies a default mapping or namespace mapping for prefixes, which Oracle Database uses when evaluating the XPath expression(s).

The argument defaults to the namespace of the root element. If you refer to any subelement in , then you must specify , and you must specify the "who" prefix in both of these arguments.

The return value is :

  • 0 if no nodes remain after applying the XPath traversal on the document

  • 1 if any nodes remain

Examples

The following example tests for the existence of the node in the XML path of the column of the sample table :

SELECT warehouse_id, warehouse_name FROM warehouses WHERE EXISTSNODE(warehouse_spec, '/Warehouse/Docks') = 1; WAREHOUSE_ID WAREHOUSE_NAME ------------ ----------------------------------- 1 Southlake, Texas 2 San Francisco 4 Seattle, Washington

One thought on “Existsnode In Pl/Sql What Is The Assignment Operator

Leave a Reply

Your email address will not be published. Required fields are marked *