Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,9 @@ def read_file_content(file):
|
|
| 58 |
elif file.type == "application/xml" or file.type == "text/xml":
|
| 59 |
tree = ET.parse(file)
|
| 60 |
root = tree.getroot()
|
| 61 |
-
return ET.tostring(root, encoding='unicode')
|
|
|
|
|
|
|
| 62 |
elif file.type == "text/plain":
|
| 63 |
return file.getvalue().decode()
|
| 64 |
else:
|
|
|
|
| 58 |
elif file.type == "application/xml" or file.type == "text/xml":
|
| 59 |
tree = ET.parse(file)
|
| 60 |
root = tree.getroot()
|
| 61 |
+
#return ET.tostring(root, encoding='unicode')
|
| 62 |
+
return CompressXML(ET.tostring(root, encoding='unicode'))
|
| 63 |
+
|
| 64 |
elif file.type == "text/plain":
|
| 65 |
return file.getvalue().decode()
|
| 66 |
else:
|