|
|
Re: Handle comments in xml file on Resource load/save [message #417320 is a reply to message #417316] |
Wed, 05 March 2008 11:34 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------020901090505010601000109
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Ron,
It's kind of horrible but the only way right now. It makes me wonder if
an option that populates the comments into this map (the same way as
unrecognized content can be handled) might be useful to a significant
number of clients:
| /**
* Returns the map with {@link EObject} as keys and corresponding {@link org.eclipse.emf.ecore.xml.type.AnyType}s as the values.
* It's used to record unrecognized elements and attributes.
*/
Map<EObject, AnyType> getEObjectToExtensionMap();|
Ron Bermejo wrote:
> Hi,
>
> If you want to save these XML comments then I think you will need to
> set mixed="true" to the appropriate complexType in your schema. The
> downside to this is that your generated code for this type will use
> FeatureMaps for its features, instead of the straightforward or more
> "natural-looking" API :)
>
> Hth,
> Ron
>
--------------020901090505010601000109
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ron,<br>
<br>
It's kind of horrible but the only way right now.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03265 seconds