Can I change BeautifulSoup's behavior regarding converting XML tags to lowercase?
import html5lib
from html5lib import treebuilders
f = open("mydocument.html")
parser = html5lib.XMLParser(tree=treebuilders.getTreeBuilder("beautifulsoup"))
document = parser.parse(f)
'document' is now a BeautifulSoup-like tree, but retains the cases of tags. See html5lib for documentation and installation.
According to Leonard Richardson, creator|maintainer of Beautiful Soup, you can't.