[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.emf] loading and saving XML using EMF classes

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