Some of the DOM implementations support serialization (including Xerces), as do most of the Java-specific models (JDOM, dom4j, etc.). Writing the document as text and parsing it to reconstruct the DOM or other representation on the other end is actually going to be faster than using Java serialization, though. You can see some details, including time and size measurements for this, in an article I wrote for IBM developerWorks at http://www-106.ibm.com/developerworks/xml/library/x-injava/index.html
There's an open source project I started called XMLS that addresses this issue and streams XML between programs with lower overhead than text: http://www.sosnoski.com/opensrc/xmls/index.html The published version only supports JDOM and dom4j, though. Both XMLS and the document model performance study are overdue for updates. My main system has been out of commission for over a month while I waited for the replacement of a defective disk drive from (ironically) IBM, and this has slowed me down considerably. I finally received this yesterday and should have the updates online next week. - Dennis Lev Gelfer wrote: >So basically the only one way to send an XML document is to convert it into a String >and sent the String back, is it right? > >---------------------------------------------------------------------- >Lev Gelfer >Global Credit Product, New York > (212) 469-2229 (desk) > (917) 686-3972 (cell) > [EMAIL PROTECTED] (email) >---------------------------------------------------------------------- > > >-- > >This e-mail may contain confidential and/or privileged information. If you are not >the intended recipient (or have received this e-mail in error) please notify the >sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or >distribution of the material in this e-mail is strictly forbidden. > >
