[XML-SIG] [ pyxml-XBEL-1856104 ] getAttribute returns blank string

SourceForge.net noreply at sourceforge.net
Fri Dec 21 23:08:15 CET 2007


XBEL item #1856104, was opened at 2007-12-21 16:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=707658&aid=1856104&group_id=6473

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Gazi Alankus (alanic7)
Assigned to: Nobody/Anonymous (nobody)
Summary: getAttribute returns blank string 

Initial Comment:
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


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=707658&aid=1856104&group_id=6473


More information about the XML-SIG mailing list