xmllib has fatal bug.

Fredrik Lundh fredrik at pythonware.com
Tue Jan 11 05:15:21 EST 2000


Samuel A. Falvo II <kc5tja at garnet.armored.net> wrote:
> What is up with this?  Can xmllib not handle namespaces?

your problem is that it does handle namespaces.

> What does it do with a namespace it does find, and why does
> it invalidate the mere existance of the tag?  It doesn't even _call_
> the start_schema method.  :( :( :(

in xmllib, the element name consists of the name-
space plus the tag, not just the tag.  in other words,
there is no element named "schema" in your file.

to see for yourself, add this method to your parser
class, and run it again (you have to fix the quotes
first, of course):

   def unknown_starttag(self, tag, attributes):
       print repr(tag), attributes

the docs have more info on this:
http://www.python.org/doc/current/lib/xml-namespace.html

</F>

<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->





More information about the Python-list mailing list