You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Chris Hill <ch...@wolfram.com> on 2000/07/27 16:07:41 UTC

Byte position of error

Is it possible to determine the byte position of an error using the 
SAXParser?  I'm attempting to generate an error message which includes a 
portion of the input near the error.  SAXParseException can be used to get 
the line and column of the error, but it would be more convienent to know 
the byte index of the error.

Chris


Re: Byte position of error

Posted by Dean Roddey <dr...@charmedquark.com>.
It can be done, but doing it via the SAX parser is not supported and I don't
have time to explain it right now. And it depends upon whether the
underlying transcoder supports byte offsets. Its not something that we would
want to encourage people to use, since its difficult to support and adds a
good bit of overhead to parsing. It woudl generally require a rebuild of the
system to enable it.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "Chris Hill" <ch...@wolfram.com>
To: <xe...@xml.apache.org>
Sent: Thursday, July 27, 2000 7:07 AM
Subject: Byte position of error


> Is it possible to determine the byte position of an error using the
> SAXParser?  I'm attempting to generate an error message which includes a
> portion of the input near the error.  SAXParseException can be used to get
> the line and column of the error, but it would be more convienent to know
> the byte index of the error.
>
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>