Hi,
I can't get ElementTree.fin dtext() to work with anything other than a
single-level path:
[color=blue][color=green][color=darkred]
>>> from elementtree import ElementTree
>>> tree = ElementTree.fro mstring("""\[/color][/color][/color]
.... <?xml version='1.0' encoding='us-ascii'?>
.... <html>
.... <head>
.... <title>The title</title>
.... </head>
.... </html>
.... """)[color=blue][color=green][color=darkred]
>>> print tree.findtext(" */title")[/color][/color][/color]
The title[color=blue][color=green][color=darkred]
>>> print tree.findtext(" html/head/title")[/color][/color][/color]
None[color=blue][color=green][color=darkred]
>>>[/color][/color][/color]
What am I missing?
I'm using elementtree-1.2.4-20041228 on Windows with Python 2.3.
--
Richie Hindle <richie@entrian .com>
I can't get ElementTree.fin dtext() to work with anything other than a
single-level path:
[color=blue][color=green][color=darkred]
>>> from elementtree import ElementTree
>>> tree = ElementTree.fro mstring("""\[/color][/color][/color]
.... <?xml version='1.0' encoding='us-ascii'?>
.... <html>
.... <head>
.... <title>The title</title>
.... </head>
.... </html>
.... """)[color=blue][color=green][color=darkred]
>>> print tree.findtext(" */title")[/color][/color][/color]
The title[color=blue][color=green][color=darkred]
>>> print tree.findtext(" html/head/title")[/color][/color][/color]
None[color=blue][color=green][color=darkred]
>>>[/color][/color][/color]
What am I missing?
I'm using elementtree-1.2.4-20041228 on Windows with Python 2.3.
--
Richie Hindle <richie@entrian .com>