[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.emf] loading and saving XML using EMF classes
|
- From: pachanady@xxxxxxxxxxxxxx (Ramesh P)
- Date: Mon, 8 Sep 2003 04:26:40 +0000 (UTC)
- Newsgroups: eclipse.tools.emf
- Organization: http://news.eclipse.org
- User-agent: NewsPortal/0.25 (http://florian-amrhein.de/newsportal/)
Assume that we have XML something like this
<vehicle>
<car type="sedan">
<make>xy</make>
<model>yy</mode>
</car>
<car type="sedan">
<make>aa</make>
<model>bb</mode>
</car>
</vehicle>
I have generated the EMF model using this XML and have the java classes
generated.
I want the ability to load and store data using an existing XML file. I
did not find any methods in the XXXfactory class generated to load
XML(i.e. one which has EFactory class as the base).
Is there a way to do this using
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl method doLoad() and
doSave(). I am nOt sure how to use an instance of XMLResourceImpl in the
EFactory class generated.Any help is greatly appreciated.
Thanks