[PATCH] XmlParser: Incorrect execption handling