Reputation: 2069
I have an xml of this format:
What do we do to get the following condition : select Batch value="xpkk" if manufacture date is wednesday, and select Batch value=abcd when the manufacture date is monday ?
Upvotes: 0
Views: 84
Reputation: 9627
I don't know what "manufacture date is wednesday" should exactly mean. But you may try:
//material[book/manufacture/@date = 'wednesday']/Batch
If your manufacture where you are looking for is in a variable lets say day
you may try:
//material[book/manufacture/@date = $day]/Batch
Upvotes: 1