File: Data.xml
0001
name 1
navy black
0002
name 2
0003
name 3
File: inventory.xml
File: Query.xquery
uninventoryed {
for $car in doc("inventory.xml")//car,
$car in doc("Data.xml")//car
where $car/@id = $car/id
return name="{$car/name}"
quantity="{$car/@quantity}"/>
}