The DOM (Document object model) Level 2 Specification available here gives a generic API for accessing SGML and XML based file formats. This is a well known and robust API which is easy to use. The idea here is to create a subset of this API to be able to access chunk/block based file formats.
The subset includes XPath, which permits easily searching into the different "chunks" that compose the file formats. Of course, not all binary file formats can use the DOM API, as it is limited to file formats that have sections/chunks that can easily be identified.
A small overview and specification is available here (2006-08-22)
Don't hestitate to contact me if you are interested in participating in the effort to standardize this API for binary file formats.