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