File: Data.xml
0002
name 2
File: Query.xquery
declare namespace cat = "http://rntsoft.com/cat";
xmlns:prod="http://rntsoft.com/prod"> {
for $car in doc("Data.xml")/prod:car
return
{$car/prod:id}
{$car/prod:name}
}
Output:
0002
name 2