[EMAIL PROTECTED] wrote:

> c) If I want to leave the xmlns information in the string that gets fed
> to ElementTree.XML, and I want to remove the {whatever} from the tag
> before building the data structure, what is the best way to find
> {whatever} from the tag property...is this another case where one
> should be using regular expressions?

if the "whatever" in {whatever} is known in advance, you can use the 
approach described here:

     http://effbot.org/zone/element-tidylib.htm#converting-xhtml-to-html

if the "whatever" is not known, you can do e.g.

     if elem.tag.startswith("{"):
         elem.tag = elem.tag.split("}")[1]

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to