[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Java to XML
** Reply to message from "Lynda VanVleet" <lyndavv@e...> 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@T... << ** 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@x...&BODY=unsubscribe%20xml-dev List archives are available at http://xml.org/archives/xml-dev/ ***************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|