When I read an HTML document using xml.dom.ext.reader.HtmlLib.Reader, getAttribute() module for the elements returns blank string.
Attached is a test source with comments on the prints. As far as I can see, xml/dom/Element.py implements getAttribute() as:
def getAttribute(self, name):
att = self.attributes.getNamedItem(name)
return att and att.value or ''
The last three prints are from that return line. I'm not sure if xml/dom/Element.py is the source that the getAttribute() I used, but my trials show that this code should work but does not. So either this is not the source, or maybe the python source is compiled and the compiler messes something up.
Version info:
pyXml pyxml-0.8.4, installed through Gentoo ebuild.
Python 2.4.4 (#1, Nov 6 2007, 18:42:27)
[GCC 4.1.2 (Gentoo 4.1.2)] on linux2
The file that replicates the error.