export from xml to EMF possibilities [message #754576] |
Thu, 03 November 2011 11:02 |
Valerian Merkling Messages: 71 Registered: May 2011 |
Member |
|
|
Hi everyone !
Here is my goal : I've got a lots of data in xml (automatically generated, i can't modify its structure), and i want it under my self defined emf metamodel.
I also have the xsd grammar from my xml files.
My problem is that i'm not really familiar to EMF and EMF tools, so i don't know what i can do to achieve my goal.
I suppose that i have to use my xsd to make a ecore metamodel, and then a model to model transformation, to get my data in my own metamodel, am i right?
Any hint or links is welcome.
Thanks !
[Updated on: Thu, 03 November 2011 11:03] Report message to a moderator
|
|
|
|
|
Re: export from xml to EMF possibilities [message #754927 is a reply to message #754830] |
Sat, 05 November 2011 08:33 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Comments below.
On 04/11/2011 3:10 PM, niarkoleptik wrote:
> Hi Ed !
>
> I followed a tutorial and i got my .ecore file from my xsd, and that
> was really easy.
>
> Where i got some "problem" is to transform my xml data (following the
> xsd structure) in a model following the .ecore file generated.
What specifically is the problem?
>
> And yes, the final model i need is clearly different than the
> generated, but it seems there is some model to model transformation tool.
I'm not familiar with the model transformation tools. Of course you can
always write such a transformation in Java using the generated APIs for
each model
>
> In fact, i don't even know if converting my raw xml data into an ecore
> model is possible,
With enough effort, almost anything is possible.
> or better than parsing the xml and building a model myself.
Certainly you can deal with transforming either SAX events, a DOM
structure, or an EMF schema-based representation into your final EMF
representation. Probably the final one is the easiest to write while
the first will perform the best.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02615 seconds