Re: ExpatError attributes

2005-11-04 Thread Fredrik Lundh
Daniel Nogradi wrote: > According to the documentation the xml.parsers.expat module provides > the exception ExpatError and this exception has 3 attributes, lineno, offset > and code. I would like to use lineno, but can't. > try: > minidom.parse("my.xml") > except ExpatError: > print 'The

ExpatError attributes

2005-11-04 Thread Daniel Nogradi
According to the documentation the xml.parsers.expat module provides the exception ExpatError and this exception has 3 attributes, lineno, offset and code. I would like to use lineno, but can't. ExpatError itself works, for example if I do import sys from xml.dom import minidom from xml.parsers.e