How to retrieve the full qualified document type name by passing a document instance

Hi experts,

I want to retrieve the full qualified document type name by passing a document instance, how can I make it?

Thank you
Xisheng