My question is: is there a document or other that explains how to represent the elements of uml diagram in universal xmi format ( for example in the class diagram how te represent a class, attribute.... in xmi format)?
Diagram definition and diagram interchange are separate specifications from the usual XMI. You can find them here: http://www.omg.org/spec/DD/1.0/ .