Miguel A Paraz wrote:
> Thanks! However you posted code for Xerces C++, while I'm using Xerces
> Java 2. In Java, InputSource does not have makeStream(), nor does it have
> a BinInputStream class.
>
> Does this mean that Xerces-J does not allow a different kind of InputSource,
> and any customization has to conform to a InputStream or a Reader?
the problem is not in input stream or reader but in how to set
SAX property /feature to request non-blocking parsing.
here is a code fragment that does it for Xerces 2 XNI (it is _not_ SAX though):
import org.apache.xerces.parsers.StandardParserConfiguration;
import org.apache.xerces.xni.parser.XMLPullParserConfiguration;
XMLPullParserConfiguration pullParserConfiguration = new
StandardParserConfiguration();
pullParserConfiguration.setDocumentHandler(this);
pullParserConfiguration.setErrorHandler(this);
and then call:
pullParserConfiguration.parse(false)
this function will deliver one callback and return (true indicates that more input is
availabel,
false is returned when parsing is finished).
hope it helps,
alek
---------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]