Javatpoint Logo
Javatpoint Logo

XQuery If Then Else Statement

The XQuery If Then Else statement is used to check the validity of the passing input values.

XQuery If Then Else Example

Let's take an example to demonstrate the usage of if-then-else statement in XQuery. Take an XML file named books.xml and apply to it XQuery expression containing an if-then-else construct to retrieve the titles of those books where price is greater than 100.

XML statementM


Xquery expression


Execute XQuery against XML

Put the above three files to a same location. We put them on desktop in a folder name XQuery9. Compile using console. You must have JDK 1.5 or later installed on your computer and classpaths are configured.




java XQueryTester


XQUERY If then else statement 1

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA