Error: Unbalanced Element Tag

Source: The error originates from the XML class, but you may see it in other classes such as REST, SOAP (which use XML internally).

Explanation: XML expects that all opening tags have a corresponding closing tag. In other words there must be a closing </p> for every <p>. Whatever input data was passed to XML did not contain a closing tag for one or more elements.

Troubleshoot: If you're using XML, then check that your input data is valid XML. When using a class that sends a network request, check the network response. Make sure it is valid XML.

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at