make XmlParser implement error interface