This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients Antoine2008, eli.bendersky, flox, karlcow
Date 2013-03-09.14:22:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362838938.04.0.438562412056.issue17138@psf.upfronthosting.co.za>
In-reply-to
Content
Gutzwiller, the [position] syntax means the Nth child *of its parent*. Since you placed the second <h1> into <p>, it's the first child of its parent. So the library's behavior is correct here. Note:

>>> [e.text for e in xml.findall('.//h1[1]')]
['1', '2']
History
Date User Action Args
2013-03-09 14:22:18eli.benderskysetrecipients: + eli.bendersky, karlcow, flox, Antoine2008
2013-03-09 14:22:18eli.benderskysetmessageid: <1362838938.04.0.438562412056.issue17138@psf.upfronthosting.co.za>
2013-03-09 14:22:18eli.benderskylinkissue17138 messages
2013-03-09 14:22:17eli.benderskycreate