Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » non-compact xml serialization
non-compact xml serialization [message #425233] Thu, 20 November 2008 12:52 Go to next message
Eclipse UserFriend
Originally posted by: angelina.velinska.tuhh.de

Hi all,

I am a newbie in EMF and am trying to find a way to make a non-compact
serialization of a model, where the defaults are not omitted.
I would like to make some queries on the resulting .ecore xml file.

Thanks for your help,

Angelina
Re: non-compact xml serialization [message #425245 is a reply to message #425233] Thu, 20 November 2008 17:05 Go to previous messageGo to next message
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
At some point when you're saving your XML you'll have an
XMLResourceImpl. On that object you need to set an option.

So for example:

myXMLResourceImpl.getDefaultSaveOptions().put(
XMLResource.OPTION_KEEP_DEFAULT_CONTENT, Boolean.TRUE);


Hope that helps,

Jason Henriksen


angelina.velinska@tuhh.de wrote:
> Hi all,
>
> I am a newbie in EMF and am trying to find a way to make a non-compact
> serialization of a model, where the defaults are not omitted.
> I would like to make some queries on the resulting .ecore xml file.
>
> Thanks for your help,
>
> Angelina
Re: non-compact xml serialization [message #425385 is a reply to message #425245] Sun, 23 November 2008 22:36 Go to previous message
Eclipse UserFriend
Originally posted by: angelina.velinska.tu-harburg.de

Hi Jason,
thank you for your answer!

Greetings
Angelina


jason henriksen schrieb:
>
> At some point when you're saving your XML you'll have an
> XMLResourceImpl. On that object you need to set an option.
>
> So for example:
>
> myXMLResourceImpl.getDefaultSaveOptions().put(
> XMLResource.OPTION_KEEP_DEFAULT_CONTENT, Boolean.TRUE);
>
>
> Hope that helps,
>
> Jason Henriksen
>
>
> angelina.velinska@tuhh.de wrote:
>> Hi all,
>>
>> I am a newbie in EMF and am trying to find a way to make a non-compact
>> serialization of a model, where the defaults are not omitted.
>> I would like to make some queries on the resulting .ecore xml file.
>>
>> Thanks for your help,
>>
>> Angelina
Previous Topic:Initializing a containment list from the containing object?
Next Topic:[TENEO] IdentifierGenerator
Goto Forum:
  


Current Time: Tue Feb 25 16:37:26 GMT 2020

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

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

Back to the top