1.

How To Perform Comparison In Xquery?

Answer»

In XQuery, comparison is performed with GENERAL comparison or value comparison.

1. General Comparison: It is performed by using the following symbols.

EX: =, !=, <, <=, >, >=

2. Value Comparison: The value comparison is performed by using the following symbols.

Ex: ne, lt, le, eq, ge, gt.

See this example:

$bookstore//book/@q > 100

If any q attributes have VALUES greater than 100, the EXPRESSION will return true OTHERWISE false.

In XQuery, comparison is performed with general comparison or value comparison.

1. General Comparison: It is performed by using the following symbols.

Ex: =, !=, <, <=, >, >=

2. Value Comparison: The value comparison is performed by using the following symbols.

Ex: ne, lt, le, eq, ge, gt.

See this example:

$bookstore//book/@q > 100

If any q attributes have values greater than 100, the expression will return true otherwise false.



Discussion

No Comment Found