Consider the following XML fragment:
<role real="Mark Hamil" star="true">Luke Skywalker</role>
For an XML database of this form:
Write XPaths for:
Write XQuery for:
- Find the title of movies with a cast of less than 20
- Find all stars of "A Clockwork Orange"
- Find the title of all movies with a related book called "Wuthering Heights"
- Find the 3rd related book to "Lord of the Rings"
- Find movies acted in by "Cate Blanchett"
- Find all movies with Mark Hamil as a non-star, released after Star Wars (do not put the year of release as a constant)
- Produce a file about years, in which there is an element for each year, and within it an element for each movie containing only the title.
- Make a file with elements like
where there are two movie elements with different movie titles, and two actor elements with the names of actors that both appeared in both movies.