1. A method to be executed at least in part in a computing device for protecting an application against malformed input data, the method comprising: defining a schema for a well-formed data file containing the input data; generating executable code based on the schema; validating the input data using the executable code; and providing validation results to the application.