Refactored formatter

This commit is contained in:
2023-03-03 09:50:54 +01:00
parent 8d8dccbbc4
commit 456be34a40
2 changed files with 18 additions and 26 deletions

View File

@@ -74,9 +74,9 @@ def process_xml(request: request, type: str) -> str:
elif (type == "xpath"):
response_json['result'] = Parser.xpath(data, process)
elif (type == "prettify"):
response_json['result'] = Parser.prettify(data)
response_json['result'] = Parser.format(data, True)
elif (type == "minimize"):
response_json['result'] = Parser.minimize(data)
response_json['result'] = Parser.format(data, False)
else:
raise ValueError("Valid operation types are: xsd, xslt, xpath")