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
Nobody/Anonymous
None
None
Public
| Filename | Description | Download |
|---|---|---|
| test.py | The file that replicates the error. | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| File Added | 259452: test.py | 2007-12-21 22:08 | alanic7 |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use