There is a way of dumping the IDoc type definition (similar to a DTD) from within the SAP system. Then use that as a meta-description of what is sent to you. AFAIK there are different ways to output the definition, HTML, C-Header, maybe even "real" DTD.
Haven't used this in quite a while, but look around where the IDocs types are defined (somewhere in the wedi menu, possibly we30).
The IDocs themselves are pretty much plain text with fixed field lengths, so you have to know where the "boundaries" between the fields/structures are. With the IDoc definitions, this shouldn't be too difficult.