I am trying to use castor 0.9.3.9  to unmarshal XML streaming
in from a socket (InputStreamReader), however unmarshal() hangs 
until the sending program closes the socket.  

I have found a web reference to a Xerces FAQ which appears
to address this issue: 
http://xml.apache.org/xerces-j/faq-write.html#faq-11

Basically, this states that Apache parsers read the entire data stream up
to
EOF, before starting the parse, and with a data stream there is no EOF
until the sender drops the socket. The FAQ provides sample code for SAX 
that extends DefaultHandler to throw a SAXException at the logical 
end-of-document.  There are some other changes as well that require
setting the SAX parser ReaderFactory to a StreamingCharFactory after
instantiation.

Is this functionality (unmarshal from a stream) possible using castor ?
Or is there a clean way to implement the SAX extensions recommended
in the FAQ while using castor?

        Kate Rosenbloom
        Santa Cruz, CA

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to