|
Re: Using Extended MetaData feature kind "Element" [message #691050 is a reply to message #690830] |
Thu, 30 June 2011 15:48 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Jan,
Comments below.
On 30/06/2011 2:44 AM, Jan Rosczak wrote:
> Hello,
>
> I have a simple ECore Model which has the following eClassifier:
>
> <eClassifiers xsi:type="ecore:EClass" name="Controller">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> lowerBound="1" eType="ecore:EDataType
> http//www.eclipse.org/emf/2002/Ecore#//EString">
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="tranCode"
> eType="ecore:EDataType http//www.eclipse.org/emf/2002/Ecore#//EString">
> <eAnnotations
> source="http///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
>
> Using the simple generated example will produce the following XML:
> <application:application
> xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http//fit/application/fis/1.0"
> name="FlightMaintenance">
> <controller name="X3060PwFlightMaintenanceController">
> <tranCode>X3060</tranCode>
> </controller>
> </application:application>
>
> My problem is that I need to read the following XML:
>
> <application>
> <controller name="X3060PwFlightMaintenanceController">
> <tranCode value="X3060"/>
> </controller>
> </application>
>
> As I do not want to define the element "tranCode" as an EClass, I
> would like to somehow transform the element <tranCode value="X3060"/>
> to <tranCode>X3060</tranCode>.
>
> Is this possible with EMF Core?
No.
>
> Thanks
> Jan Rosczak
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03356 seconds