[XML-SIG] Anybody using PyXML (4DOM) HTML DOM?

Jeremy Kloth jeremy.kloth at fourthought.com
Mon Aug 25 12:52:48 EDT 2003

John J Lee wrote:
> On Mon, 25 Aug 2003, John J Lee wrote:
> [...]
>> 1. HTMLDocument.getElementsByTagName doesn't work at all for lower-case
>> attribute values (SF bug 782470):
> Attribute *names*, I should have said (eg. the 'name' in 'name="blah"' in
> the example below).
> Actually, this problem seems to be a parser bug: Sgmlop.HtmlParser does
> setAttributeNS.  If you change that to setAttribute, it works.

The setAttributeNS method was added to support reading of HTML documents as
XML documents.  This goes back to the spotty support for XHTML I mentioned
in my previous post.  Looking at the code, I think this problem can be fixed
by overriding setAttributeNS on the HTMLElement much like createElementNS on
the HTMLDocument.

Jeremy Kloth
Fourthought, Inc. (http://fourthought.com/)
4Suite XML/RDF Platform (http://4suite.org/)

More information about the XML-SIG mailing list