You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Radu Preotiuc-Pietro <ra...@bea.com> on 2005/04/05 02:40:04 UTC

RE: Java Serialization of XmlObjects

You are probably thinking about serializing the Java generated objects. But this is not enough. This would lose information such as:
- wildcard elements and attributes
- mixed content
- namespace declarations
- relative order
- processing instructions, comments etc

In other words, XmlBeans lets you manipulate the entire XML infoset, which is one main feature that you don't find anywhere else. so when you save an xmlbean class you save the entire infoset, and the most natural serialized format for the xml infoset is ... an XML document!
In order to capture everything, you would have to take control of the Java serialization and augument it with all the pieces of information I enumerated above. I think that would be equivalent to a binary XML format. So I think that this might be the next step in this direction: support serialization to binary xml.

Radu

-----Original Message-----
From: Nathaniel G. Auvil [mailto:nathaniel_auvil@yahoo.com]
Sent: Tuesday, March 29, 2005 1:46 PM
To: dev@xmlbeans.apache.org
Subject: Java Serialization of XmlObjects



I am running some performance tests on my XMLBean Objects and i noticed that when i pass an
XmlObject to an EJB method, the XMLObject first outputs itself as XML and then writes itself to
the ObjectOutputStream.  Why the extra step?  

Wouldn't the performance be **much** better to skip the xml output and just use Java Serialization?


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org