How to extract the value of /substance/text and /makers/text?
I am expecting the result to be
- Automation
- Test Record
I have tried many things for example:
//*[local-name()='text/@value']//*[local-name()='substance']/text/text()//*[local-name()='name'][1]
(This works for first name element but if I use similar for text it doesn't work.)//*[local-name()='text/@value'][1]//*[local-name()='text'][1]
<health xmlns="http://test.com/sample">
<substance>
<name>substance</name>
<text value="Automation"/>
</substance>
<user>
<reference value="User/111111122"/>
</user>
<reaction>
<makers>
<name>makers</name>
<text value="Test Record"/>
</makers>
</reaction>
</health>