TestProject Forum

Parsing XML using XPATH

I am attempting to retrieve a login token from an API call I am making. I have put the response (which returns in XML) into an output variable. This response contains the login token I want to use later in the test. I was told I could use the Parse XML using XPATH addon to get the value out of the response but I am not seeing any documentation for this add on. The addon requests both X Path “*The XPATH to use (e.g //Price)” as well as Path to XML “The XML to work on (URL/File/String)” but I am not sure what to put in these fields.

Hi @j.hudgins,
In the Parse XML using you Xapth you have two user input fileds

  1. Xpath = the path to the stored value
  2. PathToXml = the parameter with the xml response

for example this is my xml response sorted in parameter

and i want to get the from name i would do it like this

Let me know if that helped.