Hey I would like to find a given text in an xml that looks like this:
<s:Envelope xmlns:s="http://...">
<s:Body>
<About_ServiceResponse xmlns="http://...>
<About_ServiceResult xmlns:a="http://>
<a:businessServiceVersionStructureField> <a:BusinessServiceVersionStructureType> <a:businessServiceDBVersionNameField>V001</a:businessServiceDBVersionNameField>
<a:businessServiceVersionNameField>Some Service^V100</a:businessServiceVersionNameField>
</a:BusinessServiceVersionStructureType>
</a:businessServiceVersionStructureField>
</About_ServiceResult>
</About_ServiceResponse>
</s:Body>
</s:Envelope>
So in this example i would like to find the text: “Some Service”.
I have tried with Xpath but could not get that to work. I have also tried with Gpath and all i could get there was all of the texts in one long String.
How would you do this in GPath or/and XPath?
Try this XPath:
It will return all elements which contain text node with
Some Service