Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF Resource] can resource save give a non well-formed xml file ?
[EMF Resource] can resource save give a non well-formed xml file ? [message #414421] Tue, 06 November 2007 14:13 Go to next message
Chetan Kumar is currently offline Chetan KumarFriend
Messages: 70
Registered: July 2009
Member
Dear All,

The question might sound absurd. But i don't want to assume.
I have a schema based ecore model. I am using EMF Resource to save/load an
xml file based on that schema. Now, if i serialize an instance of my
schema based model is there a possibility of getting an xml file which is
not well-formed ?

Ok, i'll be more specific. For my model, a tag <X> in xml file,
corresponds to an object of XType in the model. So if an instance of XType
is null, then the object is supposed to be serialized as <X/> ... are
there any remote chances of the same tag being serialized as </X> without
an <X> tag ??

sorry for the weird question,
Chetan Kumar
Re: [EMF Resource] can resource save give a non well-formed xml file ? [message #414423 is a reply to message #414421] Tue, 06 November 2007 14:38 Go to previous message
Ed Merks is currently online Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Chetan,

I don't think it's possible for XMLSaveImpl to produce unbalanced tags.
There could always be a bug I suppose, but generally it should not be
possible.

Chetan Kumar wrote:
> Dear All,
>
> The question might sound absurd. But i don't want to assume.
> I have a schema based ecore model. I am using EMF Resource to
> save/load an xml file based on that schema. Now, if i serialize an
> instance of my schema based model is there a possibility of getting an
> xml file which is not well-formed ?
>
> Ok, i'll be more specific. For my model, a tag <X> in xml file,
> corresponds to an object of XType in the model. So if an instance of
> XType is null, then the object is supposed to be serialized as <X/>
> ... are there any remote chances of the same tag being serialized as
> </X> without an <X> tag ??
>
> sorry for the weird question,
> Chetan Kumar
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Insert attributes from other XML-NL using FeatureMap?
Next Topic:Model Directory outside the workspace directory
Goto Forum:
  


Current Time: Fri Apr 19 05:47:45 GMT 2024

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

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

Back to the top