You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by jb...@worldstreet.com on 2000/10/27 19:39:20 UTC

Re: Handling data from a stream as it arrives

Hi Jeffrey,
I've been having the same problem reading from a ServletInputStream, and I
can't seem to find an updated copy of the FAQ with the correction. I've
been using a subclass of SAXParser that will set the ReaderFactory to a
StreamingCharFactory every time parse() is called just to be certain, but
I'm still unable to parse directly from the input stream. Could you please
repost the updated documentation?
Thanks in advance
-Jason Blumenkrantz



---------------------------------------------------------------------------------------
From: Jeffrey Rodriguez <je...@hotmail.com>
Reply-To: xerces-j-dev@xml.apache.org
To: xerces-j-dev@xml.apache.org
Subject: Re: Handling data from a stream as it arrives
Date: Wed, 20 Sep 2000 04:15:45 -0500

Hi Rob!
Good catch this is a doc bug.
I will fix it and post the correct faq in the mailing list.

Thanks,
                   Jeffrey Rodriguez
                   IBM Silicon Valley
                   XML Development


>From: Rob Ewaschuk &lt;raewasch@uwaterloo.ca>
>Reply-To: xerces-j-dev@xml.apache.org
>To: xerces-j-dev@xml.apache.org
>Subject: Handling data from a stream as it arrives
>Date: Tue, 19 Sep 2000 21:31:12 -0500
>
>The FAQ question on reading data from a stream as it arrives
>(http://xml.apache.org/xerces-j/faq-write.html#faq-11)
>offers this code (as well as a helper class):
>
>InputStream in = ... ;
>SAXParser p = new SAXParser();
>DocumentHandler h = ... ;
>// set the correct reader factory
>p.setReaderFactory(((StreamingSAXClient)h).new StreamingCharFactory());
>p.setDocumentHandler(h);
>// be sure to wrap the input stream in an InputStreamReader.
>p.parse(new InputSource(new InputStreamReader(in)));
>
>Now the line -
>p.setReaderFactory(((StreamingSAXClient)h).new StreamingCharFactory());
>- is not syntactically correct.
>Moreover, the StreamingSAXClient class is not listed in the Xerces
>documentation that comes with 1.2.0 - I'm assuming that means it's a
>class with package or private visibility modifiers.
>
>I tried -
>p.setReaderFactory(new StreamingCharFactory());
>and this did not seem to work.
>
>Can anyone help me out with this?
>
>Thanks,
>-Rob Ewaschuk
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Handling data from a stream as it arrives

Posted by Shanthi Nellaiappan <ns...@cisco.com>.
Hi,
   How to parse data coming  from a stream at it arrives, when one XML document is followed
by another one???