handle libXML errors via our own error handling methods