Short of reverse engineering the AI file format, the only way I'm aware of is to use the provided SDK functions to query the document and gather the information you're looking for.
the only way to achieve this is writing a plugin.
As said previously Adobe provides all it takes to do that (Illustrator SDK).
Using it, you will be able to parse all artwork tree and convert it in whatever you want, you need!
(Not so complicated).
This could also be done using extendscript.