You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Mathieu Champlon <ma...@masagroup.net> on 2014/11/19 16:31:51 UTC

line and column of an attribute

Hello,

I'm looking for a means to decorate my error messages with the line and 
column numbers of the location of an attribute in a DOM XML document.
I know how to do this for an element, based on the overriding of 
startElement described for instance in 
http://markmail.org/message/fofympr5oendfnxx
But I cannot find a means to do something similar for attributes...

Any help greatly appreciated !

Regards,
MAT.

Re: line and column of an attribute

Posted by John Snelson <jo...@snelson.org.uk>.
I don't think that's possible with Xerces-C - the information is lost at 
a very low level in the scanner IIRC. You might find that other XML 
parsers can give you this information.

John

On 19/11/14 15:31, Mathieu Champlon wrote:
> Hello,
>
> I'm looking for a means to decorate my error messages with the line 
> and column numbers of the location of an attribute in a DOM XML document.
> I know how to do this for an element, based on the overriding of 
> startElement described for instance in 
> http://markmail.org/message/fofympr5oendfnxx
> But I cannot find a means to do something similar for attributes...
>
> Any help greatly appreciated !
>
> Regards,
> MAT.