Hello, I am attempting to perform a progressive parse of a document, where the complete document may not be available at any time. Using SAX2XMLReader, I am attempting a progressive parse of the document. The problem occurs when parseNext() or parseFirst() is called, and no data is available yet. If BinInputSource::readBytes() returns 0, this is interpreted as an EOF. This will cause an error, because tags may be opened that are not closed etc, and I want to continue parsing at a later time once more data is available on the stream. readBytes() cannot block until more data is available, since I want to do other stuff while waiting for more data on the stream.
>From what I can see, this requires me to implement my own scanner. Unfortunately, I cannot find any decent way to implement this, since there only seems to be support for changing between the scanners that come with xerces, not implementing your own. From what I can see, I would have to implement my own version of XMLReaderFactory::createXMLReader that would return my own version of SAX2XMLReader, that would use my own version of XMLScannerResolver, that would give me my own version of the scanner. This seems overly complicated to me, is there no better way? -- Bjørnar Grip Fjær