RE: Fast text output from SAX?
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@m... Effective XML (Addison-Wesley, 2003) http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
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