In step where creating xml file
&file_path = GetCwd() | "\files\UP_INVOICEb" | %Date | ".xml";
&xml_file = GetFile(&file_path, "w", "a", %FilePath_Absolute);
Another step
/* Create XML file for header section */
&file_path = GetCwd() | "\files\UP_INVOICEb_" | %Date | ".xml";
&file_path2 = GetCwd() | "\files\UP_INVOICE_" | %Date | ".xml";
/* Now copy the file over to the second file, as the header needs to change to include encoding information for special characters. */
&XMLFile = GetFile(&file_path, "r", "a", %FilePath_Absolute);
&XMLFile2 = GetFile(&file_path2, "w", "a", %FilePath_Absolute);
&first_line = True;
While &XMLFile.ReadLine(&line_data)
If &first_line Then
&XMLFile2.WriteLine("");
&first_line = False;
Else
&XMLFile2.WriteLine(&line_data);
End-If;
End-While;
&XMLFile.Close();
&XMLFile2.Close();
&file_path = GetCwd() | "\files\UP_INVOICEb" | %Date | ".xml";
&xml_file = GetFile(&file_path, "w", "a", %FilePath_Absolute);
Another step
/* Create XML file for header section */
&file_path = GetCwd() | "\files\UP_INVOICEb_" | %Date | ".xml";
&file_path2 = GetCwd() | "\files\UP_INVOICE_" | %Date | ".xml";
/* Now copy the file over to the second file, as the header needs to change to include encoding information for special characters. */
&XMLFile = GetFile(&file_path, "r", "a", %FilePath_Absolute);
&XMLFile2 = GetFile(&file_path2, "w", "a", %FilePath_Absolute);
&first_line = True;
While &XMLFile.ReadLine(&line_data)
If &first_line Then
&XMLFile2.WriteLine("");
&first_line = False;
Else
&XMLFile2.WriteLine(&line_data);
End-If;
End-While;
&XMLFile.Close();
&XMLFile2.Close();
Comments
Post a Comment