# How to Convert json to xml request body in the postman

**URL:** <https://community.postman.com/t/how-to-convert-json-to-xml-request-body-in-the-postman/30407>\
**Category:** Help Hub\
**Tags:** tests, json\
**Created:** [December 6, 2021, 4:58am UTC](https://community.postman.com/t/how-to-convert-json-to-xml-request-body-in-the-postman/30407 "2021-12-06T04:58:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajithkumar3692](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@ajithkumar3692](https://community.postman.com/u/ajithkumar3692)\
**Post date:** [December 6, 2021, 4:58am UTC](https://community.postman.com/t/how-to-convert-json-to-xml-request-body-in-the-postman/30407/1 "2021-12-06T04:58:32Z")

</div>

_My question_: I have a XML request body. trying to update a field in the body, converted it to json using xml2Json(pm.request.body.raw) and updated the value. How can I convert this json to xml. My API accepts only xml body.

_Details (like screenshots)_:

_How I found the problem_:

_I’ve already tried_: Tried json2xml(request body). but got an error as json2xml reference is not found.
