XML: Query with "or" or "and" (Solved)
Hello there, I am new using XML and XPath as a query language...
I wonder if it is possible to make a query like this:
XMLquery = "/bookstore/books/title[../author='Jules Verne' AND ../publisher='CG Publish']"
I know it is wrong since I cannot execute the query.. But how can I do this?
I had to iterate through the results using an XPathNodeIterator and check if they would fit the condition... But isn't there a more efficient way? I thought it could be like:
XMLquery = "/bookstore/books/title[../author='Jules Verne'] AND [../publisher='CG Publish']"
But it did not want either... I searched for an example that had two conditions and I found none... Could you please help me?
Thanks in advance!