Carlos-Francisco Méndez-Cruz

Transform soft file in XML file

......@@ -50,7 +50,7 @@ if __name__ == "__main__":
if f.endswith("_family.txt"):
print("Processing...{}/{}".format(options.inputPath, f))
softText = ''
with open(os.path.join(options.inputPath, f), "r", encoding="utf-8") as iFile:
with open(os.path.join(options.inputPath, f), "r", encoding="utf-8", errors="replace") as iFile:
with open(os.path.join(options.outputPath, f.replace(".txt", ".xml")), "w",
encoding="utf-8") as oFile:
oFile.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<gse xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\nxsi:noNamespaceSchemaLocation=\"esquema-gcs.xsd\">\n\n")
......