xml.sax: Raising Exception with line number of xml source

Thomas Guetttler guettli at thomas-guettler.de
Mon Sep 8 11:08:56 EDT 2003


Hi!

How can I raise an exception while parsing with sax,
which contains the current line in the xml-file?

I want to create an message like this:
 test.xml: Line: 100, Col: 20: <foo> not allowed in <bar>

I have the filename in my content handler. I just need
the line und column number.

  thomas





More information about the Python-list mailing list