"Ing. Hans Pesata" <[EMAIL PROTECTED]> writes: > ok, as far as I understand this I would have to use the > SAX2XMLReader::parse(const InputSource& source) method instead of > SAX2XMLReader::parse(const XMLCh* const systemId) method
correct. > and I somehow have to connect my XML-file to a derived > InputSource-object which then loads it via a derived BinInputStream > ?! Yes. There are a bunch of example InputSource's in the framework/ directory: * MemBufInputSource - for XML in buffers (char*'s) * LocalFileInputSource - for disk files (just what you would have passed to parse(XMLCh* systemId) * URLInputSource - just like LocalFileInputSource except URL syntax * StdInInputSource - take input via stdin and there are 2 example streams in the util/ directory: * BinFileInputStream - input from file * BinMemInputStream - input from buffer Since your existing code uses the SystemId, I would take the LocalFileInputSource code, rename the class to HansLocalFileInputSource, and change the makeStream() method to return a HansBinFileInputStream. And then take the BinFileInputStream code and rename it to HansBinFileInputStream, add a private checksum member variable and modify the readBytes() method to update that variable whenever it reads in data. jas. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
