问题
Can some one shed some light on the difference between XML and XMI? Can XMI be used in place of XML?
回答1:
The XML Metadata Interchange (XMI) is an Object Management Group (OMG) standard for exchanging metadata information via Extensible Markup Language (XML).
XMI integrates four industry standards:
XML - eXtensible Markup Language, a W3C standard. UML - Unified Modeling Language, an OMG modeling standard. MOF - Meta Object Facility, an OMG language for specifying metamodels. MOF Mapping to XMI
http://en.wikipedia.org/wiki/XML_Metadata_Interchange
So XMI is a specific application of XML.
回答2:
OK, let's try this again.
No, you cannot use XMI in place of XML. XMI is a specific use of XML.
XMI can only be used to exchange metadata information in accordance with the OMG standard. XMI is a specific application of XML. XMI can only be used for XMI purposes. XML, on the other hand, can be used for all XML applications, including XMI.
回答3:
An XMI document is an XML document. An XML document is not necessarily an XMI document.
This is an XML document:
<myXml>
<myTag> myContent </myTag>
</myXml>
but it is not an XMI document.
XMI is a specific XML dialect. It consists of a specific set of tags with specific syntax and semantics aimed at describing a model.
来源:https://stackoverflow.com/questions/2605146/difference-between-xml-and-xmi