import sysimport xml.etree.cElementTree as etree print(etree.parse(sys.stdin).findtext(".//sessionKey"))
<root> <a> <sessionKey>key</sessionKey> tail </a> </root>
key
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!