By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,923 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,923 IT Pros & Developers. It's quick & easy.

ElementTree.findtext()

P: n/a
Hi,

I can't get ElementTree.findtext() to work with anything other than a
single-level path:
from elementtree import ElementTree
tree = ElementTree.fromstring("""\ .... <?xml version='1.0' encoding='us-ascii'?>
.... <html>
.... <head>
.... <title>The title</title>
.... </head>
.... </html>
.... """) print tree.findtext("*/title") The title print tree.findtext("html/head/title") None


What am I missing?

I'm using elementtree-1.2.4-20041228 on Windows with Python 2.3.

--
Richie Hindle <ri****@entrian.com>

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.