if you want an error message that's a little more dscriptive you can use the ErrorContext => 2 when creating the XML::Parser object, to get lines around the error,
one of the most common problem I found with XML-files-that-are-not-really-XML is that they don't include an encoding declaration, even though they include latin1 (accented) characters, if this happens often you can at least diagnose it better by doing a second run, using ProtocolEncoding => 'ISO-8859-1' when you create the parser object.
Otherwise the error message is quite random, depending on what the parser makes of the character.