I am using BeautifulSoup4, Python 3.6.
The parser is lxml-xml.
Attempting to parse the following XML and get entry.name.string
results in an error:
<entry><name>Foo>/name>>80>/value></entry>
It seems that the tag name used by BeautifulSoup is attached to the "name" attribute.
Is there any other way to retrieve child elements?
In such cases, using the entry.find("name").string
and the find function will work.
© 2024 OneMinuteCode. All rights reserved.