Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF](xml file to emf model)
[EMF] [message #662427] Wed, 30 March 2011 15:44 Go to next message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member

I have a XML file contains my model that is not an EMF model.
I want to change it to an EMF model.
knowing that I generate the metate-model EMF corresponding from the XSD.
So is it possible to transform a file XML to an EMF model?
Re: [EMF] [message #662450 is a reply to message #662427] Wed, 30 March 2011 17:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
Yes, of course that's possible. There are several articles on the
documentation page that show how it's done as well as a full tutorial
for how to create a model from an XML Schema. In fact, if you invoke
"Generate Test Code", in the *.tests project there will be a
XyzExample.java that shows how to do the loading and saving of the XML
in a standalone code snippet.


ST wrote:
>
> I have a XML file contains my model that is not an EMF model.
> I want to change it to an EMF model.
> knowing that I generate the metate-model EMF corresponding from the XSD.
> So is it possible to transform a file XML to an EMF model?
>
Re: [EMF] [message #662718 is a reply to message #662450] Thu, 31 March 2011 16:13 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member
thnak you for your reply,
I don't found the right way to do that, can you tell me exactly haw can I a load a xml file to have emf model?

EMF provide the feature of jaxb (Unmarshaller)??
Re: [EMF] [message #662727 is a reply to message #662718] Thu, 31 March 2011 16:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
Which articles have you read and which tutorials have you followed?


ST wrote:
> thnak you for your reply,
> I don't found the right way to do that, can you tell me exactly haw
> can I a load a xml file to have emf model?
>
> EMF provide the feature of jaxb (Unmarshaller)??
Re: [EMF] [message #662846 is a reply to message #662727] Fri, 01 April 2011 08:33 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member


I tried to use the method in the class XyzExample.java but I have not succeeded.
can you tell me which tutorials I follow.
Re: [EMF] [message #662977 is a reply to message #662846] Fri, 01 April 2011 15:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050506040106040505050807
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Tutorial: Generating an EMF Model using XML Schema
< http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html>

ST wrote:
>
>
> I tried to use the method in the class XyzExample.java but I have not
> succeeded.
> can you tell me which tutorials I follow.

--------------050506040106040505050807
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<a
href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html">Tutorial:
Generating an EMF Model using XML Schema</a><br>
<br>
ST wrote:
<blockquote cite="mid:in4281$drv$1@news.eclipse.org" type="cite"><br>
<br>
I tried to use the method in the class XyzExample.java but I have not
succeeded.
<br>
can you tell me which tutorials I follow.
<br>
</blockquote>
</body>
</html>

--------------050506040106040505050807--
Re: [EMF] [message #663176 is a reply to message #662977] Mon, 04 April 2011 08:54 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 42
Registered: December 2010
Member
Thank you any way,
I was sure that you do not understand me, I Created the metat-model from XSD.
and now I want PARSS xml file to create an instance of the model.
in other words I want to extract the information from xml file to fill in the model.
Re: [EMF] [message #663321 is a reply to message #663176] Mon, 04 April 2011 15:17 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
St├ęphane,

Have you managed to invoke Generate Test Code to actually look at the
generated XyzExample.java? You said something vague about not
succeeding to use it. You might want to spare a few words elaborating
on that...


st├ęphane wrote:
> Thank you any way,
> I was sure that you do not understand me, I Created the metat-model
> from XSD.
> and now I want PARSS xml file to create an instance of the model.
> in other words I want to extract the information from xml file to fill
> in the model.
>
Previous Topic:[emf compare]
Next Topic:[EEF] Master detail form extension
Goto Forum:
  


Current Time: Thu Oct 23 20:36:02 GMT 2014

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

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