Worked great, thanks!

Incidentally, for anyone interested in this in the future, the documentation
for fgXercesCalculateSrcOfs indicates that it may adversely affect
performance.  In my case, testing on a 7.2 MB file, it had no noticable
adverse effects.

-----Original Message-----
From: Alberto Massari [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 05, 2006 12:14 PM
To: [email protected]
Subject: RE: progress during sax2 parsing?


At 11:45 AM 1/5/2006 -0500, Robert William Vesterman wrote:
>Hmmm... I just tried getSrcOffset(), and I get the following error:
>
>   Run-time error '-214767259 (80004005)':
>
>   An exception occurred! Type:RuntimeException, Message:The current
>transcoding service does not support source offset information
>The only related pages I found on Google were lists of possible error
>messages (without explanations).  Anybody have any idea what's going on
>here?

Oops, I should have told you that offset calculation is performed on
demand; you have to enable it by invoking

   parser->setFeature(XMLUni::fgXercesCalculateSrcOfs, true)

Also, offset calculation is not available when using a transcoder
that doesn't provide such information, e.g. MacOS and S/390

Alberto


>Thanks.
>
>-----Original Message-----
>From: Alberto Massari [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 05, 2006 4:13 AM
>To: [email protected]
>Subject: Re: progress during sax2 parsing?
>
>
>At 04:49 PM 1/4/2006 -0500, Robert William Vesterman wrote:
> >Is there a way, while parsing using a SAX2XMLReader, to tell how far
>parsing
> >has progressed? Either percentagewise or via parsed byte count would be
> >fine.
> >
> >Thanks in advance for any help.
>
>Hi Robert,
>you can use getSrcOffset(), that returns the current byte offset
>within the input source.
>
>Hope this helps,
>Alberto


Reply via email to