How to extract value from element xml if other element has a especific value

What functions or method I should use to get the value with some conditions?