We receive lots of data as flat files: delimitted or just fixed length records. It's sometimes hard to find out what the files actually contain.
Are there any well established practices for embedding the schema of the file to the beginning or the end of a file to make the file self-explanatory?
Just to get an idea, imagine something like this:
<data name=test records=2 type=fixed>
<field name=foo start=0 length=2 type=numeric>
<field name=bar start=2 length=4 type=text>
</data>
11test
12ing
We would parse the xml in the beginning and use it for reading the records.