I have an XML file -
<Books> <Book> <PubDetails> <Pub Name="ABC"/> <Year Y="1999"/> </PubDetails> <Book Subject="Computers">XPath 2.0</Book> </Book> <Book> <PubDetails> <Pub Name="ABC"/> <Year Y="1999"/> </PubDetails> <Book Subject="Management">Financial Management</Book> </Book> </Books>
I want to get a Subject
when Y
is passed as a parameter.
For example: if I quit in 1999, then I should get "Computers", "Management" as a result.
What will be the XPath 1.0 query?
source share