Well as a developer I still may want to import non-compliant xml to the best of my ability since I can not control the source and most of the times the user of my app can not either. A exception telling them the XML is not compliant would mean nothing to most brewers. I think this is where the SDK can fill some gaps. I want to give the programmer consitant objects to deal with and prevent a lot of "is this element defined" code.
For me this saves a ton of time for the developer by not having to write exception code and focus on other aspects of their app.
If our SDK can take the worst xml and make consistant objects that would be great. Maybe there needs to be some meta data in our objects that the developer can use to rank compliance. Some example methods might be.
isSchemaCompliant(): boolean - to tell them if it met the schema
getSchemaScore(): int - maybe a score on how bad the data might be. They can then choose to import based on the score...
getSchemaErrors(): struct/map - what elements are missing or bad.
Just some thoughts. The above mehods could be on the "recipe" object or part of a validation object.
--
Ryan Thompson-Jewell