Re: How to get Element Content rather than Attribute [message #422441] |
Fri, 05 September 2008 20:15 |
|
I have added eclipse.tools.emf to the list as per Ed's advice on another post.
Thanks Ed,
Joel
On 2008-09-01 21:20:58 +0100, Joel Rosi-Schwartz
<Joel.Rosi-Schwartz@Etish.org> said:
> Hi,
>
> I am trying to find a way to coerce EMF to model some text as Element
> content rather than as an Attribute. To make this explicit, how EMF
> normally serialises at String field is as such:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <epo:PurchaseOrder xmlns:epo="http://www.example.com/ExtendedPO">
> <details description="This could potentially be a very long string."/>
> </epo:PurchaseOrder>
>
> The value of "description" could be any length, f.i. it could be stored
> as a CLOB.
>
> What I would like EMF to produce is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <epo:PurchaseOrder xmlns:epo="http://www.example.com/ExtendedPO">
> <details>
> <description>This could potentially be a very long string.</description >
> </details>
> </epo:PurchaseOrder>
>
> Is it possible to get EMF to co-operate in this way?
>
> Thanks,
> Joel
--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme
|) ::: (| The Open Requirements Management Too
====w=w==== [https://useme.dev.java.net]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Re: How to get Element Content rather than Attribute [message #422514 is a reply to message #422442] |
Mon, 08 September 2008 10:18 |
|
Works like a charm, thanks Ed. One small correction is that it is
XMLResource.OPTION_EXTENDED_META_DATA rather than
XMLResource.OPTION_EXTENDED_METADATA
Btw, for others who may use this thread for assistance in the future, I
found that Chapter 9 "XML Schema" of the "EMF: Eclipse Modeling
Framework, Second Edition" fills in a lot of the details about this. It
is currently on Safari Rough Cuts at
http://safari.oreilly.com/9780321331885
All the best,
Joel
--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme
|) ::: (| The Open Requirements Management Too
====w=w==== [https://useme.dev.java.net]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
Powered by
FUDForum. Page generated in 0.03563 seconds