[EMAIL PROTECTED] wrote:
> I build up the representation of the output document in DOM and use
> the XMLSerializer (DOMSerializer) to give me a string representation. 

Serializing to a String is not a good idea because it will
constantly have to re-allocate blocks of memory to fit the
characters. Of course, it all depends on what you end up
doing with that String -- perhaps this is your only option.

> Unfortunately, it doesn't seem that InputSource is socket 
> 'friendly'. It seems to hang waiting for input to complete. 

There are two problems: 1) XML documents only end when the
stream is closed because there is nothing in an XML document
that denotes the end; 2) Xerces 1.x will only start parsing
once it has filled its internal buffer (or if the stream
closes) -- Xerces2 does not have this problem.

You have to find a "clever" way to solve the first problem.
You may find the socket.io.WrappedOutput/InputStream classes
useful. They are part of the Xerces2 samples but can be used
generically. Check the JavaDoc of these classes for details.

-- 
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to