XML tag case

25 views
Skip to first unread message

got_m...@yahoo.com

unread,
Oct 18, 2008, 1:24:21 PM10/18/08
to beautifulsoup
There was a post on this group last year about XML case in tags and I
haven't seen a followup. Is there a way to prevent BeautifulStoneSoup
from converting all XML tags to lower case? XML tags are case
sensitive and this has been causing us lots of problems. Thanks,

Leonard Richardson

unread,
Oct 20, 2008, 11:52:47 AM10/20/08
to beauti...@googlegroups.com

Unfortunately this is sgmllib behavior and Beautiful Soup can't do
anything to change it. You might try using ElementTree.

Leonard

Aaron DeVore

unread,
Oct 20, 2008, 11:46:14 PM10/20/08
to beauti...@googlegroups.com
html5lib's XMLParser class correctly handles case sensitivity and can
create a BS tree. It has to be XMLParser, not HTMLParser.

-Aaron

Reply all
Reply to author
Forward
0 new messages