Home / Interview / XQuery :: General Questions

Interview :: XQuery


What do you mean by XQuery FLWOR?

FLWOR is an acronym which stands for "For, Let, Where, Order by, Return."

For - It is used to select a sequence of nodes.

Let - It is used to bind a sequence to a variable.

Where - It is used to filter the nodes.

Order by - It is used to sort the nodes.

Return - It is used to specify what to return (gets evaluated once for every node).


What is the use of XQuery HTML format?

XQuery HTML format is a way to transform an XML document into an HTML page

13) What is selecting and filtering element in XQuery?

Selecting and filtering refer to query to the database for selecting a group of data and filtering that data for a specific type. For example to select the name of books whose price is less than 30 dollars? XQuery FLWOR and Path expression are used for selecting and filtering the XML elements. Both are used to select and filter the desired elements.

For example:

14) How to perform conditional operations in XQuery?

Conditional operation in XQuery is If-Then-Else operation. Let?s take an example to see how to use it:



What is the syntax of XQuery language?

The elements, attributes and variables in XQuery language must be valid XML names and follow case sensitivity.


What do you mean by XQuery add?

XQuery add is used for adding elements, attributes, HTML elements and text in the results from the input documents

17) What are the different types of XQuery functions?

A list of different types of XQuery functions:

  • Accessor Functions
  • Error and Trace Functions
  • Numeric Functions
  • String Functions
  • AnyURI Functions
  • Boolean Functions
  • Duration/Date/Time Functions
  • QName Functions
  • Node Functions
  • Sequence Functions
  • Context Functions
18) What are the uses of time and date function in XQuery?

In XQuery, time and date function are used to get time and date. There are three types of time and date functions in XQuery:

  • current-date()
  • current-time()
  • current-datetime()
19) What is the use of current-date() function in XQuery?

The XQuery current date function is used to retrieve the current date.


What is the use of current-time() function in XQuery?

The XQuery current-time function is used to retrieve the current time.