Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Adding text content to EObjects generated from XSD
Adding text content to EObjects generated from XSD [message #652933] Mon, 07 February 2011 16:28 Go to next message
Denis Weerasiri is currently offline Denis WeerasiriFriend
Messages: 1
Registered: February 2011
Junior Member
I have generated an EMF object model derived from XML schema. I can edit it and add new attributes and add new child elements to the object model. But I can't add text contents to the objects which should be possible based on the schema.
eg - <name></name> -> <name>bob</name>
How can I add text contents to the EObjects which should be possible based on the schema?

Anyway suppose my xml contains <name>alice</name>, then I can refer it using
name.getMixed().getValue(0). As well I can replace the content using name.getMixed().setValue(0, "NewName")
Re: Adding text content to EObjects generated from XSD [message #653079 is a reply to message #652933] Tue, 08 February 2011 11:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30544
Registered: July 2009
Senior Member
Denis,

It's hard to answer questions like this without seeing the schema. I
expect there are child creation commands for adding anything necessary
and that you can use the properties view for changing the text of such
entries.


Denis Weerasiri wrote:
> I have generated an EMF object model derived from XML schema. I can
> edit it and add new attributes and add new child elements to the
> object model. But I can't add text contents to the objects which
> should be possible based on the schema.
> eg - <name></name> -> <name>bob</name>
> How can I add text contents to the EObjects which should be possible
> based on the schema?
>
> Anyway suppose my xml contains <name>alice</name>, then I can refer it
> using
> name.getMixed().getValue(0). As well I can replace the content using
> name.getMixed().setValue(0, "NewName")
Previous Topic:[CDO] CDO4 simultaneous release plans
Next Topic:Save GMF and EMF in different datastores (TENEO)
Goto Forum:
  


Current Time: Tue Oct 15 11:54:14 GMT 2019

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

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

Back to the top