"Tinny Ng" <[EMAIL PROTECTED]> writes:

> May we know why you need access to the Scanner?
> 
> The XMLScanner was designed as an internal class, where its API may be
> changed quite OFTEN.   So it is not recommended to use it directly.   May be
> there are some other interfaces that you can call to retrieve the same
> information.   For example the parser has getRootGrammar(),
> getGrammar(XMLCh* namespace), getURIText(unsigned int uriId) ... etc. which
> I believe will definitely help.

Hey Tinny,

These are good points. I would definately prefer not having to access
something as low-level as the Scanner.

Getting the grammar was one issue, so I'm glad there are better API's
for that.

The other thing that I had begun working on was using a SAX parser to
grab the underlying byte offsets for various events, so that I could
cache offsets into a large file and only retrieve data when I needed
it. To get the offsets I was doing something like:

  parser->getScanner->getSrcOffset();

This is not required by any means, but I believed it would be a
powerful technique for handling some of the very large XML files that
we're dealing with (>500Mb).

Cheers,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to