Avoid DeprecationWarning from xml.etree.Element.getchildren()

This commit is contained in:
Paul Romano 2015-12-08 07:19:31 -06:00
parent 9cde4ce12c
commit f84a4ee430

View file

@ -1,7 +1,7 @@
def sort_xml_elements(tree):
# Retrieve all children of the root XML node in the tree
elements = tree.getchildren()
elements = list(tree)
# Initialize empty lists for the sorted and comment elements
sorted_elements = []