You need to use the ID3DXFileData::GetName() to get the name of an object. Something along these lines:
// Get size of buffer first
SIZE_T sz = 0;
xdata->GetName(0, &sz);
// Load if not empty
char* name = 0;
if(sz > 1)
{
name = new char[sz];
xdata->GetName(name, &sz);
}