OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Java to XML

[ Lists Home | Date Index | Thread Index ]
  • From: "Anthony B. Coates" <abcoates@TheOffice.net>
  • To: xml-dev@xml.org
  • Date: Mon, 03 Apr 2000 21:48:23 +1000

** Reply to message from "Lynda VanVleet" <lyndavv@earthlink.net> on Thu, 23
Mar 2000 12:21:01 -0800

Interestingly, there seems to be two minds in Sun about whether it is better to
go Java -> XML or XML -> Java.  For example, the Swing team is working on a
utility that serialises JavaBeans in XML.  However, some people feel that
JavaBean serialisation has never worked as was originally hoped, and that just
using XML as the encoding format will not improve things.

The alternative suggestion, which Sun are also working on, is to "compile" XML
Schemas into matching Java classes.  This is subtly different, because you are
not trying to capture a dynamic object state in XML, rather you are capturing an
inherently serialisable XML structure in Java.

For my own part, I like this second strategy more.  Most object-oriented
languages only specify class structure to one level - objects class A can (for
example) contain child objects of classes B and C, but to see what the
"grandchildren" of A are, you have to examine the B and C classes separately,
and these are commonly in separate files.  With an XML document, you can see the
structure to arbitrary depth in the one file ("includes" not withstanding),
which strikes me as a better way to get a feel for the data structure.  So
starting with XML and "compiling" to Java could make some code easier to
understand, which would not be a bad thing.

	Cheers,
			Tony.

> We need to write an application in Java that takes a Java Class and converts
> it to a XML document preserving attribute types and values.  The streamed
> Java object is converted to a XML application of it.  We can write the code
> but were hoping it already exists to lisence or use.  I have checked
> java.sun, technet.oracle, and alphaWorks.


** Anthony B. Coates    >> mailto:abcoates@TheOffice.net <<
** Software Engineer (Java).  This is a 100% Pure Java e-mail.
** AJUG National Secretary (see http://www.ajug.org.au/)

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS