[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Serializing objects to and from XML documents.

On Mon, 10 Jan 2000, Eric van der Vlist wrote:
> Hi,
> I have (at last) found an opportunity to download ozone (0.3.3) and to
> begin playing with it and I am amazed by the possibilities such a tool
> is opening.
> One of them which I'd like to investigate further is to implement "XML
> enabled" objects which could be initialized through XML documents and
> would have also be able to be outputted as XML.

To make this clear: we are talking about mapping of general (business)
database objects into XML - not just storing/retrieving XML data, right? Ok,
this one is on the to-do list already. We did not start working yet. Our first
idea was to make a DOM that converts database content into XML using
reflection and a given mapping (KOALA, BML or something). This would allow to
access the entire database content via DOM and standard XML tools. The DOM
methods that change nodes are a problem and not the only one I guess ;) So we
need a good spec before we can start coding. Any ideas?

> It wouldn't be storing a DOM in ozone, but rather to convert DOM nodes
> to object properties...
Again, code that allows you to store/retrieve just simple XML data is already
part of the current ozone package.

> I see many benefits of doing this.
> The input from XML would allow an easy initialization of complex
> objects.
> The output to XML would facilitate the usage by web application (using a
> XSL transformation to produce HTML or XML).
> The output + input would allow a kind of logical dump of objects.
Yes, today oozone lacks an ad-hoc query interface/tool. XML/DOM seems to be
perfect for this.

> With the few things I have seen of ozone, it looks like it would be
> quite easy to implement a generic mechanism by extending the OzoneObject
> class...
Oh, not that easy, IMHO. ;)

First we have to decide...
1. which mapping to use.
2. what is the database API for this new thing.

Ideas, experiences?

Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de