XML as an alternative to Object Serialization?

Tyler Baker tyler at infinet.com
Thu Jan 15 22:06:56 GMT 1998


I have had an idea as a solution to a problem I have, but my problem is
much more limited than this idea...

One thing I need to know is if anyone is doing any work on higher-level
API's for creating XML documents, DTD's etc.  I can do this myself as
writing an XML Formatter is a hell of a lot easier than writing an XML
Parser, but nevertheless I have not seen any tools like this that I am
aware of (I think MSXML might have something like that but I do not
know).  I just want a simple API to make method calls which spits stuff
out to a java.io.OuputStream.

Now my idea rests upon the power of Reflection in JDK 1.1+.  I have had
experience in using Reflection to auto-map Java class files and
interfaces to a relational database by auto-generating SQL create
scripts, and I had the idea that XML could be used as an alternative to
Object Serialization for small to medium sized content.  XML of course
is much fatter as a persistence framework than something like Object
Serialization but for web browsers and the web in general, embedding
this info via XML in a page may make more sense in some circumstances,
especially since you would get the added boon of your Java Object being
cached on the users computer.

Now doing a good implementation of this would require a bit of work, and
probably the best way of doing this might involve screwing around with
the Externalizable interfaces, but I just wanted to get some idea from
other people as to whether or not they think that this would be a good
idea, but more importantly a useful idea.  I am an independent
programmer, so I can work on this from time to time when my other
projects are not so time consuming, but this would not be a trivial task
to implement even though I have a pretty good idea of how to do it (or
at least an idea of a working implementation).  Considering the success
that SAX has had to date in its efficiency of being moved along, I
thought that this sorta thing might warrant some attention.

Any comments?

Tyler


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list