Tyk Gateway error - Failed to decode body: json: cannot unmarshal string into Go value of type []main.DBPolicy

This error has nothing to do with your XML issue, it is related to your gateway not bootstrapping properly on first start. You may need to turn the gateway service off for 20s and then bring it up again (it’s worth checking your policy connections string too).

This is invalid XML, so it will not work, there’s no real work around except putting your URLs into a CDATA section.