How to make an element transient? [message #508479] |
Tue, 19 January 2010 06:52 |
Karthik Srinivasan Messages: 9 Registered: July 2009 |
Junior Member |
|
|
I have an xml that looks like this-
<parent type="x">
<child type="a"/>
<child type="b"/>
<child type="c"/>
</parent>
I have generated the ecore for that from the schema and I have an emf model from that.
At runtime on my emf model, I would like to make a specific child object (say <child type="b">) transient so that it is not serialized.
How do I go about doing that?
I tried childObject.eContainmentFeature().setTransient(true) where childObject is an instance that has type="b".
But that makes all the child objects as transient (i.e disappear when I serialize).
So I get -
<parent type="x"/>
Thanks,
Karthik
[Updated on: Tue, 19 January 2010 06:53] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03574 seconds