Will xml.dom work with HTML docs?

Martin v. Löwis loewis at informatik.hu-berlin.de
Sun Sep 15 15:27:04 EDT 2002


Henrik Motakef <henrik.motakef at web.de> writes:

> Does it do so by using an actual DTD, or is HTML-specific knowledge
> hardcoded in it?
> 
> I.e. could this feature be used with other document types?

It's hard-coded (for HTML 4). The support code is generated (as a set
of dictionaries), so you could probably port it to another DTD; I
believe there are constraints to the DTD (i.e. you might need to losen
the content model).

Regards,
Martin



More information about the Python-list mailing list