A Comment is a true UML model element with a corresponding metaclass. A Comment element - along with it's body text - is stored in the model's "repository". If you unzip your .mdzip project file you'll find <ownedComment> elements like this in XMI:
<uml:Model xmi:id='eee_1045467100313_135436_1' name='eSchool' visibility='public'> <xmi:Extension extender='MagicDraw UML 15.1 EAP beta' extenderID='MagicDraw UML 15.1 EAP beta'> <moduleExtension ignoredInModule='true'/> </xmi:Extension> <ownedComment xmi:type='uml:Comment' xmi:id='_15_1EAPbeta_41b01a5_1206031981598_738250_98' body='Author:drck. Created:21/03/08 03:53. Title:. Comment:. '> <annotatedElement xmi:idref='eee_1045467100313_135436_1'/> </ownedComment> <ownedComment xmi:type='uml:Comment' xmi:id='_15_1EAPbeta_41b01a5_1206032150212_504528_254' body='What is the difference between a Comment and a Note ?'> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206032190538_630673_263'/> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206032218065_913844_302'/> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206033844150_249704_509'/> </ownedComment> <ownedComment xmi:type='uml:Comment' xmi:id='_15_1EAPbeta_41b01a5_1206032209466_431076_292' body='A comment can be owned by any element.'> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206032534469_292077_402'/> </ownedComment> <ownedComment xmi:type='uml:Comment' xmi:id='_15_1EAPbeta_41b01a5_1206032218065_913844_302' body='A Comment may carry a stereotype, like this «answer» Comment does.'> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206032315808_587036_340'/> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206033294238_506951_465'/> </ownedComment>
In MagicDraw UML a «documentation» Comment is a special case. Although an <ownedComment> does appear in the XMI project file, the corresponding Comment can't be found in the containment browser; rather, only the owning element is shown in the browser (along with an other owned elements):
<packagedElement xmi:type='uml:Class' xmi:id='_15_1EAPbeta_41b01a5_1206032198918_773500_271' name='DocumentMe' visibility='public'> <xmi:Extension extender='MagicDraw UML 15.1 EAP beta' extenderID='MagicDraw UML 15.1 EAP beta'> <modelExtension/> </xmi:Extension> <ownedComment xmi:type='uml:Comment' xmi:id='_15_1EAPbeta_41b01a5_1206033403960_761781_475' body='<html> <head> </head> <body> <p> In MagicDraw UML a &#160;&#171;documentation&#187;&#160; Comment is used to display the documentation of an element. Use &#160;<b>Retrieve Documentation</b>&#160; from a Comment attached to an Element by a handle. </p> </body> </html> '> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206032198918_773500_271'/> <annotatedElement xmi:idref='_15_1EAPbeta_41b01a5_1206033859779_864981_519'/> </ownedComment> <ownedRule xmi:type='uml:Constraint' xmi:id='_15_1EAPbeta_41b01a5_1206035096633_538298_730' name='constraint' visibility='public'> <constrainedElement xmi:idref='_15_1EAPbeta_41b01a5_1206032198918_773500_271'/> <specification xmi:type='uml:OpaqueExpression' xmi:id='_15_1EAPbeta_41b01a5_1206035096634_102223_731' visibility='public' body='this=that' language='OCL2.0'/> </ownedRule> <generalization xmi:type='uml:Generalization' xmi:id='_15_1EAPbeta_41b01a5_1206034781959_486860_633' general='_15_1EAPbeta_41b01a5_1206034776815_532127_610'/> </packagedElement>
A note is not a true UML model element. In MagicDraw UML the body of a note is not stored in the model "repository". If you unzip your .mdzip project file you'll find that the note's <text> is in fact stored as a custom XMI extension:
<mdElement elementClass='Note' xmi:id='_15_1EAPbeta_41b01a5_1206034680723_700552_597'> <elementID xmi:idref='_15_1EAPbeta_41b01a5_1206032198918_773500_271'/> <properties> <mdElement elementClass='ColorProperty'> <propertyID>PEN_COLOR</propertyID> <propertyDescriptionID>PEN_COLOR_DESCRIPTION</propertyDescriptionID> <value xmi:value='-6711040'/> </mdElement> <mdElement elementClass='BooleanProperty'> <propertyID>AUTOSIZE</propertyID> <propertyDescriptionID>AUTOSIZE_DESCRIPTION</propertyDescriptionID> <value xmi:value='true'/> </mdElement> </properties> <geometry>560, 553, 141, 102</geometry> <text>This note calls out Element Properties selected in the Element Properties compartment</text> <elementProperties xmi:value='QPROP:Element:isAbstract^QPROP:Element:name'/> <active xmi:idref='_15_1EAPbeta_41b01a5_1206034686712_886949_608'/> </mdElement>
