Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Inserting intermediate nodes in XML persistence format
Inserting intermediate nodes in XML persistence format [message #400401] Tue, 18 April 2006 15:45 Go to previous message
Tillmann Seidel is currently offline Tillmann SeidelFriend
Messages: 5
Registered: July 2009
Junior Member

I am looking for an easy solution to change the way EMF persists model
instances to XML. My specific problem is how to insert intermediate
grouping nodes into the XML tree without having to alter the model
itself or mess around with the persistence.

Let's assume we have a model with two classes:

class C2 {
String name;


class C1 {
EList c2s; // contains instances of C2

where c2s contains a list of instances of C2.

Creating a model instance and persisting it to XML will lead to
something like

<c2s name="foo"/>
<c2s name="bar"/>

Now what we would like to have is an XML representation where all
instances of C2 are contained in an intermediate grouping node c2s:

<C2 name="foo"/>
<C2 name="bar"/>

My question is: can this kind of XML representation be configured using
the ExtendedMetaData annotation mechanism?

Thanks in advance
Read Message
Read Message
Previous Topic:Weak References on containment
Next Topic:Creating a model from an existing Database!?
Goto Forum:

Current Time: Thu Jun 21 03:12:25 GMT 2018

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

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

Back to the top