File: Data.xml
0001
name 1
navy black
0002
name 2
0003
name 3
0004
name 4
white gray
Our favorite shirt!
File: prices.xml
29.99
10.00
69.99
39.99
3.99
File: Query.xquery
for $car in doc("Data.xml")//car
return {
attribute price
{for $price in doc("prices.xml")//prices/priceList/prod
where $car/id = $price/@id
return $price/price}
}