Hi,
I'm trying to parse a XMI file which has a xmi:XMI root node (like shown in the example at https://www.euclideanspace.com/software/information/xml/xmi/index.htm):
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:types="http://www.eclipse.org/xtext/common/JavaVMTypes" xmlns:xbase="http://www.eclipse.org/xtext/xbase/Xbase">
...
</xmi:XMI>
If I try to parse this file, I get the following error:
terminate called after throwing an instance of 'std::logic_error'
what(): missing package: xmi
Aborted (core dumped)
I think that the reason is that there's no meta model found in the MetaModelRepository for the namespace xmi.
This is the code I'm using to register the meta models in the repository:
::ecorecpp::MetaModelRepository_ptr repository = ::ecorecpp::MetaModelRepository::_instance();
::ecore::EcorePackage_ptr ecorePackage = ::ecore::EcorePackage::_instance();
repository->load(ecorePackage);
::types::TypesPackage_ptr typesPackage = ::types::TypesPackage::_instance();
repository->load(typesPackage);
::xbase::XbasePackage_ptr xbasePackage = ::xbase::XbasePackage::_instance();
repository->load(xbasePackage);
Do I have to add another package to the registry to be able to parse XMI files with a xml:XMI root node?
Thank you in advance!
Best regards,
Mario
Hi,
I'm trying to parse a XMI file which has a
xmi:XMIroot node (like shown in the example at https://www.euclideanspace.com/software/information/xml/xmi/index.htm):If I try to parse this file, I get the following error:
I think that the reason is that there's no meta model found in the MetaModelRepository for the namespace
xmi.This is the code I'm using to register the meta models in the repository:
Do I have to add another package to the registry to be able to parse XMI files with a
xml:XMIroot node?Thank you in advance!
Best regards,
Mario