Maybe adding the /recursive=1 qualifier will give you what you want. If so, please click the checkmark to accept this answer.

SAMPLES>d $system.OBJ.Export("Cinema.Film.cls","c:\s\exp1.xml")                  
Exporting to XML started on 04/13/2017 09:49:36
Exporting class: Cinema.Film
Export finished successfully.
 
SAMPLES>d $system.OBJ.Export("Cinema.Film.cls","c:\s\exp2.xml","/recursive=1")   
Exporting to XML started on 04/13/2017 09:49:39
Exporting class: Cinema.Duration
Exporting class: Cinema.Film
Exporting class: Cinema.FilmCategory
Export finished successfully.
 
SAMPLES>