[jdom-interest] Re: DOMBuilder vs PipedStreams

Frank Kmiec kmiec at inil.com
Tue Jan 16 15:28:34 PST 2001


Good points. Thanks.

--Frank

----- Original Message -----
From: "Lennon Day-Reynolds" <lennon at allpredict.com>
To: <jdom-interest at jdom.org>
Sent: Monday, January 15, 2001 5:55 PM
Subject: [jdom-interest] Re: DOMBuilder vs PipedStreams


> The org.jdom.adapters package contains adapter classes that can be used
with
> XMLOutputter and most of the major parsers to produce a compatible DOM
> model, so you're not really locked in to any one platform. Using the
> PipedInput/OutputStream classes would work more universally, but you incur
> the overhead of parsing the same document twice -- once to build the JDOM
> tree, and once when the receiving end builds its DOM tree from the text
form
> of the JDOM document. Plus, you have to pump the entire JDOM tree through
> the XMLOutputter, are limited to byte-oriented insead of character-based
I/O
> through the piped streams...all in all, a lot of overhead.
>
> If your classes/threads are running in the same VM, you will almost
> undoubtedly get better performance, document integrity, and reliability by
> simply building the DOM tree, and passing it to the receiving side. The
only
> case in which I could really see it making sense going through the full
> JDOM -> XML -> DOM parsing cycle would be if your data needed to be sent
> over a network connection.
>
> -----------------------------------
> Lennon Day-Reynolds
> Java Engineer
> AllPredict, Inc.
>
> lennon at allpredict.com
> 415-876-7500 ofc
> 240-250-5593 fax
>
> http://www.allpredict.com/
> AllPredict BuddyName: lennon
> -----------------------------------
>
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>




More information about the jdom-interest mailing list