I want to search for an XML nodes value without knowing the node’s parent. I read in XML docs that to search for a value, you can use the following syntax:
//book[price>35.00]
This selects all the book elements anywhere in the xmldocument that have a price element with a value greater than 35.00
What I want to do is not reference the book node but instead find all price elements anywhere in the xmldocument with a value greater than 35.00. How do I write this?
I am using XmlDocument classes in C#.
Use this XPath:
//price[. > 35.00]