Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,11 +39,9 @@ def get_table_download_link(file_path):
|
|
39 |
return href
|
40 |
|
41 |
def CompressXML(xml_text):
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
elem.getparent().remove(elem)
|
46 |
-
return ET.tostring(tree.getroot(), encoding='unicode')
|
47 |
|
48 |
def read_file_content(file):
|
49 |
if file.type == "application/json":
|
@@ -96,3 +94,4 @@ def main():
|
|
96 |
|
97 |
if __name__ == "__main__":
|
98 |
main()
|
|
|
|
39 |
return href
|
40 |
|
41 |
def CompressXML(xml_text):
|
42 |
+
root = ET.fromstring(xml_text)
|
43 |
+
ET.strip_elements(root, ET.Comment)
|
44 |
+
return ET.tostring(root, encoding='unicode')
|
|
|
|
|
45 |
|
46 |
def read_file_content(file):
|
47 |
if file.type == "application/json":
|
|
|
94 |
|
95 |
if __name__ == "__main__":
|
96 |
main()
|
97 |
+
|