Ferdinand added the comment:
I found a solution :
from xml.sax import make_parser
from xml.sax.handler import feature_namespaces, feature_validation
from xml.sax.handler import ContentHandler, ErrorHandler, DTDHandler
With the library above, they is no display bug
New submission from Ferdinand:
Code is working, but the TEXT variable is not showing the correct line of the
XML file but the the line after correct one :
Exemple :
[u6v7mr@vl-a-txx-05 Python]$ ./validateXML.py DTD/herve.xml DTD/Tomcat.dtd
ERROR: 'I' is not an allowed value for
Ferdinand Beyer added the comment:
Line and column number are included in the formatted error message ("raise
ValueError(errormsg(...))"). They are currently not accessible separately as
exception arguments.
--
___
Python trac
New submission from Ferdinand Beyer:
The linecol() function in json/decoder.py computes the line and column numbers
for a byte offset in a string. Both numbers are expected to start with 1 (as
in text editors).
If the position is in the first line, the returned column is off by one (or