Using BeautifulSoup to parse my XML
import BeautifulSoup
soup = BeautifulSoup.BeautifulStoneSoup( \"\"\"hello
I don't have a "why", but this might be of interest to you. If you use BeautifulSoup (no Stone) to parse XML with a self-closing tag, it works. Sort of:
>>> soup = BeautifulSoup.BeautifulSoup( """hello """ ) # selfClosingTags=['alan'])
>>> print soup.prettify()
hello
The nesting is right, even if alan is rendered as a start and an end tag.