News for hackers. Stuff that matters.
Re:XML is almost always misused by elFarto on Tuesday October 29, 2019 @05:40PM (#21392377)
The XPath for the second one would be:

//root/item/key[text()="Name"]/../value/text()

Re:XML is almost always misused by icebraining on Tuesday October 29, 2019 @06:03PM (#21392582)
Alternatively

  //root/item[key[text()="Name"]]/value/text()
Re:XML is almost always misused by benibela on Tuesday October 29, 2019 @06:35PM (#21392837)
You usually do not need to use text() in xpath, so this should work the same:

  //root/item[key="name"]/value