The following constants are defined for XML error codes (as returned by xml_parse()):
Here's the full list of all 733 error codes
http://www.xmlsoft.org/html/libxml-xmlerror.html#xmlParserErrors
XML_ERR_NAME_REQUIRED - Means you have an entity that isn't valid in XML.
For example: & < and > all have to be escaped as & < and > respectively.