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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Fast text output from SAX?

[ Lists Home | Date Index | Thread Index ]

At 10:43 AM -0500 4/15/04, Hunsberger, Peter wrote:


>Oh come on, if I have a XML DOM and ship it between two classes do you
>expect me to check for well-formedness?  How about if I serialize that
>DOM and ship it across RMI?  I may need to check the validity of the
>data structure, but "well formedness" is purely an artifact of the
>(character version of the) XML syntax... Now what exactly is the
>difference between sending a serialized XML DOM across RMI and shipping
>some other "binary" XML format?

First of all, a serialized DOM is not an XML document. Let's be clear 
about that. That being said, I wouldn't trust such a serialized DOM 
for a New York minute. I would insist that the idiot sending it send 
me real XML instead, and if they refused I would indeed try to dump 
it to XML and reparse. The chance that you can actually get a DOM 
object through RMI intact is miniscule.

I don't expect your program to check its internal data structures for 
well-formedness at every step. (I do expect your program to check any 
preconditions on published methods though.) If one of those data 
structures is a DOM Document, fine. But we're not talking about that. 
We're talking about shipping data between different processes on 
different machines and different architectures. XML is interoperable 
across this. DOM isn't.

So I guess what I'm saying is you're right. There's no difference 
between sending a serialized XML DOM across RMI and shipping some 
other "binary" XML format. they're both incredibly fragile things 
that will break and probably sooner rather than later.

-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA




 

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

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