Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » Get The elements from xmi
Get The elements from xmi [message #98115] Thu, 22 January 2009 12:57 Go to next message
Eclipse UserFriend
Hi everyone,

I Would like to get the attribute values and the attribute names in a xmi
file that I just generate using atl. For example, the XMI file looks like
that:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:mapaexpandido=" platform:/resource/MapeamentoEstrategia/metamodels/MapaExpan dido.ecore ">
<mapaexpandido:MapaExpandido visao="Touzet" missao="David">
<perspectiva nome="Financeira"/>
<perspectiva nome="Cliente"/>
<perspectiva nome="ProcessosInternos"/>
<perspectiva nome="InovacaoAprendizado"/>
</mapaexpandido:MapaExpandido>
<mapaexpandido:Objetivo nome="objetivoF">
<indicador nome=""/>
<meta nome=""/>
<iniciativa nome=""/>
<id id="1"/>
</mapaexpandido:Objetivo>
<mapaexpandido:Objetivo nome="objetivoC">
<indicador nome=""/>
<meta nome=""/>
<iniciativa nome=""/>
<id id="2"/>
</mapaexpandido:Objetivo>
<mapaexpandido:Objetivo nome="objetivoP">
<indicador nome=""/>
<meta nome=""/>
<iniciativa nome=""/>
<id id="3"/>
</mapaexpandido:Objetivo>
<mapaexpandido:Objetivo nome="objetivoI">
<indicador nome=""/>
<meta nome=""/>
<iniciativa nome=""/>
<id id="4"/>
</mapaexpandido:Objetivo>
<mapaexpandido:Objetivo nome="objetivoTeste">
<indicador nome=""/>
<meta nome=""/>
<iniciativa nome=""/>
<id id="5"/>
</mapaexpandido:Objetivo>
<mapaexpandido:Efeito source="/4" target="/3">
<valor porcentagem="10.0"/>
</mapaexpandido:Efeito>
<mapaexpandido:Efeito source="/3" target="/2">
<valor porcentagem="20.0"/>
</mapaexpandido:Efeito>
<mapaexpandido:Efeito source="/2" target="/1">
<valor porcentagem="40.0"/>
</mapaexpandido:Efeito>
</xmi:XMI>

Anyone can help me ?

Thanks and sorry about my english. :-)
[ATL]Re: Get The elements from xmi [message #98160 is a reply to message #98115] Fri, 23 January 2009 03:56 Go to previous message
Eclipse UserFriend
Hello,

Please, remember to prefix the subject of your ATL-related posts with
[ATL].

I'm not sure to understand your question...

This is an EMF Model, so you have to use
EMF(http://www.eclipse.org/modeling/emf/) API to read/write it.

Regards,

William

Karlos Thadeu a écrit :
> Hi everyone,
>
> I Would like to get the attribute values and the attribute names in a
> xmi file that I just generate using atl. For example, the XMI file looks
> like that:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:mapaexpandido=" platform:/resource/MapeamentoEstrategia/metamodels/MapaExpan dido.ecore ">
>
> <mapaexpandido:MapaExpandido visao="Touzet" missao="David">
> <perspectiva nome="Financeira"/>
> <perspectiva nome="Cliente"/>
> <perspectiva nome="ProcessosInternos"/>
> <perspectiva nome="InovacaoAprendizado"/>
> </mapaexpandido:MapaExpandido>
> <mapaexpandido:Objetivo nome="objetivoF">
> <indicador nome=""/>
> <meta nome=""/>
> <iniciativa nome=""/>
> <id id="1"/>
> </mapaexpandido:Objetivo>
> <mapaexpandido:Objetivo nome="objetivoC">
> <indicador nome=""/>
> <meta nome=""/>
> <iniciativa nome=""/>
> <id id="2"/>
> </mapaexpandido:Objetivo>
> <mapaexpandido:Objetivo nome="objetivoP">
> <indicador nome=""/>
> <meta nome=""/>
> <iniciativa nome=""/>
> <id id="3"/>
> </mapaexpandido:Objetivo>
> <mapaexpandido:Objetivo nome="objetivoI">
> <indicador nome=""/>
> <meta nome=""/>
> <iniciativa nome=""/>
> <id id="4"/>
> </mapaexpandido:Objetivo>
> <mapaexpandido:Objetivo nome="objetivoTeste">
> <indicador nome=""/>
> <meta nome=""/>
> <iniciativa nome=""/>
> <id id="5"/>
> </mapaexpandido:Objetivo>
> <mapaexpandido:Efeito source="/4" target="/3">
> <valor porcentagem="10.0"/>
> </mapaexpandido:Efeito>
> <mapaexpandido:Efeito source="/3" target="/2">
> <valor porcentagem="20.0"/>
> </mapaexpandido:Efeito>
> <mapaexpandido:Efeito source="/2" target="/1">
> <valor porcentagem="40.0"/>
> </mapaexpandido:Efeito>
> </xmi:XMI>
>
> Anyone can help me ?
>
> Thanks and sorry about my english. :-)
>
Previous Topic:[Declarative QVT] Transformation problem , beginer
Next Topic:[ATL] Looking for BPMN and BPEL MetaModels
Goto Forum:
  


Current Time: Sun Jun 01 19:40:28 EDT 2025

Powered by FUDForum. Page generated in 1.05920 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top