Javatpoint Logo
Javatpoint Logo

XQuery Add

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

Let's understand it by using an example.

XQuery Add Example

Take an XML file named books.xml, having the following data.


XQuery Expression


Now this XQuery expression will return the title elements in the same manner as they are described in the input document.


XQuery Add

Now you can add your own elements and attributes to the result.

Add HTML Elements and Text

If you want to add some HTML elements to the result, use the XQuery like this:


XQuery Add2
Next TopicXQuery Functions

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA