Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Free text between tags in XML
Free text between tags in XML [message #1062231] Thu, 06 June 2013 15:44 Go to next message
Roseline Gourinel is currently offline Roseline GourinelFriend
Messages: 3
Registered: June 2013
Location: France
Junior Member
Hello everybody

I have to generate from an EMF model, a XML document. But the output format is already defined.

I wanted to know if it is possible to generate a xml file with free text between tags.
Example:
<tag>
free text
<tag/>

In the free text, it could be some HTML tags.

Thanks in advance
Re: Free text between tags in XML [message #1062266 is a reply to message #1062231] Thu, 06 June 2013 20:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26237
Registered: July 2009
Senior Member
Roseline,

Is there a schema for the XML format from which you can generate the EMF
model?

On 06/06/2013 7:40 PM, Roseline Gourinel wrote:
> Hello everybody
>
> I have to generate from an EMF model, a XML document. But the output
> format is already defined.
>
> I wanted to know if it is possible to generate a xml file with free
> text between tags.
> Example:
> <tag>
> free text
> <tag/>
>
> In the free text, it could be some HTML tags.
>
> Thanks in advance
>
Re: Free text between tags in XML [message #1062386 is a reply to message #1062266] Fri, 07 June 2013 13:28 Go to previous messageGo to next message
Roseline Gourinel is currently offline Roseline GourinelFriend
Messages: 3
Registered: June 2013
Location: France
Junior Member
Hello,

Thank you for your quickly response ...
Actually, I have to extract my own EMF model into a document with several formats (pdf, word, ...).
We chose to use Arbortext XML (and then the target format via this tool) because already used in the company.

I have to investigate for Arbortext schemas. I am not sure to find one because this is a close product. I will search ...

Then, if I well understand, I can importe it into an emf model and then the conversion will be easier (EMF model to EMF model) ?

I was told an other way is to override the serialization of my output model. Do you agree ?

Re: Free text between tags in XML [message #1062513 is a reply to message #1062386] Sat, 08 June 2013 07:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26237
Registered: July 2009
Senior Member
Roseline,

Comments below.

On 07/06/2013 3:28 PM, Roseline Gourinel wrote:
> Hello,
>
> Thank you for your quickly response ...
> Actually, I have to extract my own EMF model into a document with
> several formats (pdf, word, ...).
> We chose to use Arbortext XML (and then the target format via this
> tool) because already used in the company.
>
> I have to investigate for Arbortext schemas. I am not sure to find one
> because this is a close product. I will search ...
>
> Then, if I well understand, I can importe it into an emf model and
> then the conversion will be easier (EMF model to EMF model) ?
Yes, then it will be automatic.
>
> I was told an other way is to override the serialization of my output
> model. Do you agree ?
Yes it's always possible to write your own ResourceImpl or to derive
from the parts uses by XMLResourceImpl.

For the use case you mention specifically, the XMLType package's AnyType
is good for capturing arbitrary XML content. You could have a look at
this for more details:
http://www.theserverside.com/news/1364302/Binding-XML-to-Java
>
>
Re: Free text between tags in XML [message #1063606 is a reply to message #1062513] Thu, 13 June 2013 13:48 Go to previous message
Roseline Gourinel is currently offline Roseline GourinelFriend
Messages: 3
Registered: June 2013
Location: France
Junior Member
Hello !

I got the solution just right now !
I spent all my (working) time reading links you gave me.
I found it in your book Wink

In fact I have to use a multiplicity-Many Attribute...

But now I know how to use a xsd, a serialization ...
I have to continue my EMF immersion / training.

Thanks to you !
Previous Topic:Using EMF/GWT with Juno SR1
Next Topic:Separation of generated code
Goto Forum:
  


Current Time: Fri Nov 28 08:55:54 GMT 2014

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

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