Am 12. September 2021 19:14:40 MESZ schrieb Gilles: >tracks = root.findall('.//snipet|.//LookAt|.//Style|.//StyleMap')
Just use root.iter('snippet', 'LookAt', 'Style', 'StyleMap') It's certainly faster, and I also find it nicer to read. Stefan _______________________________________________ lxml - The Python XML Toolkit mailing list -- lxml@python.org To unsubscribe send an email to lxml-le...@python.org https://mail.python.org/mailman3/lists/lxml.python.org/ Member address: arch...@mail-archive.com