# XML Body in API Query component fails with SAXParseException: Content is not allowed in prolog

**URL:** <https://matillioncommunity.discourse.group/t/xml-body-in-api-query-component-fails-with-saxparseexception-content-is-not-allowed-in-prolog/1818>\
**Category:** Matillion ETL\
**Created:** [July 17, 2022, 11:39pm UTC](https://matillioncommunity.discourse.group/t/xml-body-in-api-query-component-fails-with-saxparseexception-content-is-not-allowed-in-prolog/1818 "2022-07-17T23:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SB699925](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/sb699925/32/1180_2.png) [@SB699925](https://matillioncommunity.discourse.group/u/SB699925)\
**Post date:** [July 17, 2022, 11:39pm UTC](https://matillioncommunity.discourse.group/t/xml-body-in-api-query-component-fails-with-saxparseexception-content-is-not-allowed-in-prolog/1818/1 "2022-07-17T23:39:47Z")

</div>

I'm setting up a custom API Query and the POST endpoint requires an XML body.

When I run this in Postman it works fine, but translating the same request to Matillion API Query component fails with this error:

&nbsp;

SAXParseException: Content is not allowed in prolog.

&nbsp;

I've tried changing the XML (URL encoding) but no luck. Below is the response.

&nbsp;

 ![0694G00000LV05JQAT_0D54G00008cTfcmSAC](https://us1.discourse-cdn.com/flex002/uploads/matillioncommunity/original/1X/3daa3d57a21be6e17a5b3a6ae05399193647ddcd.png)

&nbsp;

Any suggestions?

&nbsp;

Cheers,

Steve

---

<div class="post-metadata">

**Author:** ![SB699925](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/sb699925/32/1180_2.png) [@SB699925](https://matillioncommunity.discourse.group/u/SB699925)\
**Post date:** [July 18, 2022, 3:44am UTC](https://matillioncommunity.discourse.group/t/xml-body-in-api-query-component-fails-with-saxparseexception-content-is-not-allowed-in-prolog/1818/2 "2022-07-18T03:44:37Z")

</div>

In this case, I was able to copy the python script from postman into a python component. That has worked to return the data. I wish I could figure out the api query though, it's a little less complicated to deal with the response that way.
