I get a xml and want to extract the value of one element by XPath Extractor, however it returns "Assertion failure message: -1" in jmeter.
<flag>
<sample>123</sample>
<others>...</others>
<target>a test sample</target>
</flag>
<flag>
<sample>1234</sample>
<others>...</others>
<target>a test sample</target>
</flag>
In order to get the text of element <target> where the <sample> is 123, several ways have been tried but failed:
//flag[sample='123']/target//sample[.='123']/../target//sample[@value='123']/../target/@value//sample[text()='123']/../target/text()
Is there a way to capture the value of element <target>?

<others>...<others>should be<others>...</others>- Nesku