File: Data.xml
0001
name 1
0002
name 2
0003
name 3
File: Query.xquery
{
for $car in doc("Data.xml")/order/car
where $car/@model='A'
order by $car/name
return - {data($car/name)}
}
Output:
- name 1