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:Don't see grid
Next Topic:Placing Decorations
Goto Forum:
  


Current Time: Tue Dec 12 14:21:16 GMT 2017

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

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