Ich versuche, eine BeyerSoup 4.4.0-Datei, die Tag-Namen in camelCase hat, in eine XML-Datei zu scannen, und find_all scheint sie nicht finden zu können. Beispielcode:find_all mit camelCase-Tag-Namen mit BeautifulSoup 4
from bs4 import BeautifulSoup
xml = """
<hello>
world
</hello>
"""
soup = BeautifulSoup(xml, "lxml")
for x in soup.find_all("hello"):
print x
xml2 = """
<helloWorld>
:-)
</helloWorld>
"""
soup = BeautifulSoup(xml2, "lxml")
for x in soup.find_all("helloWorld"):
print x
Der Ausgang ich erhalte, ist:
$ python soup_test.py
<hello>
world
</hello>
Was ist der richtige Weg, Kamel verrohrten/groß geschrieben Tag-Namen zu suchen?