Search code examples
xpathsoapautomationanywhere

Issue while Executing XPath Function in Automation anywhere


I'm trying to use Execute XPath Function in automation anywhere.

In the response I'm getting the value as "MS.Internal.XML.XPath.XPathSelectionIterator"

XPath looks like :

//GetEmployees/Employee/text()

I'm sure that xpath is correct since I have tested with Java code.

Looks like the control is returning an object instead of text string.

Is there a way we can do it ?


Solution

  • Got the answer to this one by trial and error.

    Was trying to parse soap response and I believe it was facing an issue with namespace.

    got wit working by using the following expression

    string(//soap:Envelope/soap:Body/*[name()='GetEmployees']/*name()='Employee'])

    Hope this helps and some one could improve it further.