First of all you need to get the guid of the template that is currently being parsed. Then you lock the id3dxfiledata object and it gives you a pointer to data (depending on the template being used).
All types can be gotten by copying "data type size" bytes from the pointer returned by the lock operation. The only type to watch out for is the string type which returns the address of the string in memory. You need to take care of freeing that memory later on as well. so something like:
pdata->lock( &sz, &data );
// stract whatever you need form data then
If you're having trouble recursing an xfile then you can check my site in my sig. Goto the meshes section in the tutorials section and check the parsing and x file tutorial. The recursive framework for parsing an xfile is all defined and explained there.