Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Extreme XML deserializing
Extreme XML deserializing [message #423970] Sat, 11 October 2008 16:50 Go to next message
gary s thompson is currently offline gary s thompsonFriend
Messages: 92
Registered: July 2009
Member
Hi

could some one suggest where I might start in creating a an xml
deserializer for a format that is completely foreign to emf?

Are there any example of this, if so where should I look?

Will I need to replace the DefaultHandler in a subclass of XMLLoadImpl?

Also the format I am reading doesn't use file extensions and starts with
a directory as the root of the pseudo file. This doesn't seem to fit
with how resource factories are registered and used will I need to
override delegatedGetFactory() in a ResourceFactoryRegistryImpl?

once again as usual and in advance thanks for any help rendered!

regards
gary
Re: Extreme XML deserializing [message #423971 is a reply to message #423970] Sat, 11 October 2008 17:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Gary,

Comments below.


gary thompson wrote:
> Hi
>
> could some one suggest where I might start in creating a an xml
> deserializer for a format that is completely foreign to emf?
A format that's not describable with a schema?
>
> Are there any example of this, if so where should I look?
I've not seen something that's so funky you couldn't write a schema for it.
>
> Will I need to replace the DefaultHandler in a subclass of XMLLoadImpl?
That's where most of the deserialization work will be done. It's
effectively just a SAX handler.
>
> Also the format I am reading doesn't use file extensions and starts
> with a directory as the root of the pseudo file. This doesn't seem to
> fit with how resource factories are registered and used will I need to
> override delegatedGetFactory() in a ResourceFactoryRegistryImpl?
I'm pretty sure the support added in 2.4 for content types should
suffice. You can look in the XMI plugin.xml's registrations for Ecore
and EMOF content types as an example. This idea is basically to
associate a content type with the namespace of the root element and then
to register a content_parser against that content type. You'd still
need to list which extensions to consider for content type matching if
you use the Eclipse platform's content type registration mechanism. In
any case, you should be able to accomplish anything by adding your own
ContentHandler to the URIConverter's list of ContentHandlers.
>
> once again as usual and in advance thanks for any help rendered!
>
> regards
> gary


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO 1.0] weak references and adapters
Next Topic:Re: Using JET with EMF model
Goto Forum:
  


Current Time: Fri Apr 19 04:45:41 GMT 2024

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

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

Back to the top