In an XML document, I have an element with a DateTime tag, which can be extracted using:
for elem in xml_tree_root.iter(tag='DateTime'):
print(elem.text)
in another version of the same XML file, the tag's name is blahblooDateTimebloobli. So I need something like:
for elem in xml_tree_root.iter(tag='*DateTime*'):
print(elem.text)
that could work for both versions of the XML. But with the latter it doesn't work. It matches everything though, if I only put '*' which means in principle it must somehow work. My question is whether it is possible to feed regexp to elementtree iter search?