Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » XML document as input rather than serialized objects
XML document as input rather than serialized objects [message #222052] Thu, 24 August 2006 15:53 Go to next message
Eclipse UserFriend
Originally posted by: pilgrim.us.ibm.com

I'm looking for advice as to how to implement an editor using a file
containing an XML document as the input file. Currently my GEF-based
editor's input is a file containing a serialized diagram. My plugin.xml
declares the extension of this serialized file to be used by my editor.
When I save the diagram, after the byte outputstream is written, I next
write an XML document representing the diagram.

What I'd like to do is make the file containing the XML document the
editor's input. If there is a corresponding serialized file, I'd next
read that because it contains some information such as location which is
not retained in the XML document.
Re: XML document as input rather than serialized objects [message #222065 is a reply to message #222052] Thu, 24 August 2006 20:42 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Your model and its persistence is an issue that GEF knows nothing about. You
might consider mapping your POJOs to and from a DOM, which can then be
(de)serialized. Or, you could use a modelling framework such as EMF.

BTW, when you serialize java objects, I'm pretty sure there is a mechanism
for XML serialization instead of binary. I don't know what's involved other
than I saw it mentioned at JavaOne years ago.

"Jeff" <pilgrim@us.ibm.com> wrote in message
news:99727868dd6553cdcf227374f009f900$1@www.eclipse.org...
> I'm looking for advice as to how to implement an editor using a file
> containing an XML document as the input file. Currently my GEF-based
> editor's input is a file containing a serialized diagram. My plugin.xml
> declares the extension of this serialized file to be used by my editor.
> When I save the diagram, after the byte outputstream is written, I next
> write an XML document representing the diagram.
>
> What I'd like to do is make the file containing the XML document the
> editor's input. If there is a corresponding serialized file, I'd next
> read that because it contains some information such as location which is
> not retained in the XML document.
>
>
>
Previous Topic:Placing Decorations
Next Topic:how to fire a request or how to nest commands
Goto Forum:
  


Current Time: Thu Jan 23 12:02:09 GMT 2025

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

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

Back to the top