Question: Consider the following XQuery: for $x in /messages/message where $x/date/day='1' and $x/date/month='January' and $x/date/year='2021' return {Sender: , $x/from/text() } {Recipient: , $x/to/text() } ($x/msg/text
Consider the following XQuery: for $x in /messages/message where $x/date/day='1' and $x/date/month='January' and $x/date/year='2021' return {"Sender: ", $x/from/text() } {"Recipient: ", $x/to/text() } ($x/msg/text ()} It produces the following output: Sender: Kim Recipient: Thanh See you in 5 minutes Sender: Joyce Recipient: Steve No time today Add another entry (message element) to your answer at 2a that would not be picked up by the XQuery. Just invent the data for the correctly named elements.
Step by Step Solution
There are 3 Steps involved in it
The XQuery provided in the image is designed to select message elements from a messages element base... View full answer
Get step-by-step solutions from verified subject matter experts
