This can be shortened to <code>element = self.xmltreefile.find('/capability')</code>.