# How to use xpath to store response data

**URL:** <https://community.gatling.io/t/how-to-use-xpath-to-store-response-data/5704>\
**Category:** Gatling (Open-Source)\
**Created:** [July 7, 2020, 5:49pm UTC](https://community.gatling.io/t/how-to-use-xpath-to-store-response-data/5704 "2020-07-07T17:49:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nischay\_sah](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@nischay\_sah](https://community.gatling.io/u/nischay_sah)\
**Post date:** [July 7, 2020, 5:49pm UTC](https://community.gatling.io/t/how-to-use-xpath-to-store-response-data/5704/1 "2020-07-07T17:49:21Z")

</div>

Hi

I’m having trouble to implement xpath to store the response data.

Response Body:

**some value**  
389259413609672301  
BDD Tester

Code:

```auto
.exec(http("ABC")
  .put("")
  .body(ElFileBody("src/test/scala/mdm/scripts/ABC/Body.xml"))
    .check(xpath("/*/PartyId/").saveAs("PartyId"))
))

```

```auto

```

```auto
When trying this I'm getting type mismatch error. Is this the right way to implement xpath? I'm new to gatling and couldn't find much info on xpath online.

```

```auto
Thanks in advance 

```

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [July 7, 2020, 7:02pm UTC](https://community.gatling.io/t/how-to-use-xpath-to-store-response-data/5704/2 "2020-07-07T19:02:40Z")

</div>

Well, there are tons of XPath tutorials out there, not specific to Gatling.  
Just make sure to declare any extra namespace?
