Message183822
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'] |
|
Date |
User |
Action |
Args |
2013-03-09 14:22:18 | eli.bendersky | set | recipients:
+ eli.bendersky, karlcow, flox, Antoine2008 |
2013-03-09 14:22:18 | eli.bendersky | set | messageid: <1362838938.04.0.438562412056.issue17138@psf.upfronthosting.co.za> |
2013-03-09 14:22:18 | eli.bendersky | link | issue17138 messages |
2013-03-09 14:22:17 | eli.bendersky | create | |
|