Skip to main content


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: 33136
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
>


Ed Merks
Professional Support: https://www.macromodeling.com/
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: 33136
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
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Free text between tags in XML [message #1063606 is a reply to message #1062513] Thu, 13 June 2013 13:48 Go to previous messageGo to next 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 !
Re: Free text between tags in XML [message #1802439 is a reply to message #1063606] Fri, 08 February 2019 22:45 Go to previous messageGo to next message
Calvin Liu is currently offline Calvin LiuFriend
Messages: 2
Registered: February 2019
Junior Member
Please allow me to pick up this topic after so many years...

Recently I'm looking for an alternative solution for Arbortext XML editor and I'm wondering if Eclipse could be the one.

One thing important to us is that Arbortext XML editor can protect the name of elements defined in DTD file from being changed while editing the content of the XML file -- means you can delete the whole element (with its children) but cannot change the name defined in DTD file, as attached screen snapshot showed.

Can I just change some settings to let Eclipse XML editor works in the same mode? Or Do I have to create a plugin myself to customize it? Thanks.
Re: Free text between tags in XML [message #1802688 is a reply to message #1802439] Thu, 14 February 2019 05:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
The believe the Eclipse XML editor you are referring to is provided by the Web Toolsproject.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Free text between tags in XML [message #1802729 is a reply to message #1802688] Thu, 14 February 2019 17:33 Go to previous messageGo to next message
Calvin Liu is currently offline Calvin LiuFriend
Messages: 2
Registered: February 2019
Junior Member
Ed., thanks for the feedback. Do you mean this project (https://www.eclipse.org/webtools/)? And to be more specific, the XML Component of Source Editor? https://www.eclipse.org/webtools/wst/components/xml/overview.html
Re: Free text between tags in XML [message #1802745 is a reply to message #1802729] Fri, 15 February 2019 04:12 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Yes, I believe so.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO]
Next Topic:[EMF Compare] Conflict of Indexes/order
Goto Forum:
  


Current Time: Fri Apr 19 02:50:06 GMT 2024

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

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

Back to the top