Skip to main content



      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 11:28 Go to next message
Eclipse UserFriend
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 06:33 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 11:16:44 EDT 2025

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

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

Back to the top