Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

XML requests with special characters are not parsed

If API calls had a special character & within the request body which the xml parser does not parse. All the calls which had this special character failed. The calls were successful when the & was encoded as &\; But when different characters were tried as a part of the request, it was noticed that > and , works but < and & doesn't get parsed.

How this is handled and what is the reason for this behaviour? Why some special characters work while some doesn't?

Solved Solved
1 3 3,519
1 ACCEPTED SOLUTION

XML requires that some characters be escaped. the ampersand is not a valid character in XML and must be replaced with an XML entity reference like & amp; . A CDATA section can also be used. This is not an issue/bug with any policy in Apigee Edge. It is an invalid XML document. (user error, not a product error)

View solution in original post

3 REPLIES 3