Kamesh,
Comments below.
Kamesh Sampath wrote:
Hi,
Can anyone how we can control the element ordering in EMF
Serialization, e.g I have the following EMF model class,
├───Paragraph
│ ├───bullettedText
(0..*)
│ ├───formattedText
(0..*)
│ ├───heading
(0..*)
│ ├───table (0..*)
│ └───text (0..*)
The following are some samples that shows what I want to do when
serialization happens
e.g - 1 : ExamplePara1(text,heading,formattedtext)
e.g. - 2 : ExamplePara2( text,heading,text,formattedtext,text)
e.g. - 3 :
ExamplePara3(text,heading,text,formattedtext,text,formattedtext,bullettedtext,text)
What I am trying to achieve is that I want the any reference features
to occur in any order and also in mixed format.
Try defining an <xsd:complexType> with mixed="true". This will
produce a model that supports what you show above. This will likely
prove useful
Binding
XML to Java
Summary I don't what the element to be grouped within a parent as all
texts together , all paragraph together etc., i need to them to occur
in the order i create then in the Editor
Be sure your complex type allow that mixed order.
Is there anyway we can do this in EMF Serialization. Any property we
need to set ? I tried with "ordered" property of the Class but in vain.
Thanks.
Kamesh
|