If an XML doc contains an element name which is not lower case, bad things happen.
It would seem this is related to #84, and indeed setting parser='xml' fixed the problem.. but this really should be better documented, or even auto-detected.
However even with this fix, mixed case tags are not picked up correctly when using closest() or parents(), this is a bug.
It's also worth mentioning that this problem did not happen on BeautifulSoup.
Here is a small script that will reproduce the behaviour;
If an XML doc contains an element name which is not lower case, bad things happen.
It would seem this is related to #84, and indeed setting
parser='xml'
fixed the problem.. but this really should be better documented, or even auto-detected.However even with this fix, mixed case tags are not picked up correctly when using
closest()
orparents()
, this is a bug.It's also worth mentioning that this problem did not happen on BeautifulSoup.
Here is a small script that will reproduce the behaviour;