I have the following code snippet in XMLSPY which runs properly:
xquery version "1.0";
<query2>
{
for $r in /reviews/review
return $r/reviewer
}
</query2>
How do I include xml filename in xpath, something as abc.xml/reviews/review ??
I have the following code snippet in XMLSPY which runs properly:
xquery version "1.0";
<query2>
{
for $r in /reviews/review
return $r/reviewer
}
</query2>
How do I include xml filename in xpath, something as abc.xml/reviews/review ??
I could solve the question by myself:
<query2>
{
for $r in doc("reviews.xml")/reviews/review
return $r/reviewer
}
</query2>