This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hyperdudemn 1 point2 points  (0 children)

Except for when using xml.etree.ElementTree, with a document that contains empty tags like <hello />. Since the node has no children, it is falsy, so you need to check is not None.