XQuery XML help

  • Thread starter KataKoniK
  • Start date
  • #1
168
0
I have to write an XQuery that for example, "returns a list of books for a given author".

The "given author" in this case can be anything. Therefore, I was wondering what do I need to add to give the query someting, which in return, it will process it.

For example,

for $x in doc("a.xml")/Stuff
where $x/Author = [given author]
return $x/Book
 

Answers and Replies

  • #2
221
0
If the "given author" can be anything, that means it doesn't need to meet a certain condition in order to be processed, correct? And therefore, you shouldn't need to condition it with a "where" statement.

Merely process the Author attribute as you need it. What is it exactly that you are trying to do?
 

Related Threads on XQuery XML help

  • Last Post
Replies
9
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
3
Views
680
Replies
4
Views
3K
Replies
3
Views
948
Replies
16
Views
386
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
4K
Top