XMLファイルをで編集するスクリプトを書いていますBeautifulStoneSoup
が、ライブラリはすべてのタグを小文字に変換します。ケースを保存するオプションはありますか?
import BeautifulSoup
xml = "<TestTag>a string</TestTag>"
soup = BeautifulSoup.BeautifulStoneSoup(xml, markupMassage=False)
print soup.prettify() # or soup.renderContents()
#prints
>>> <testtag>a string</testtag>
#instead of the expected
>>> <TestTag>a string</TestTag>