When saving a file (using fclose(f)) where I have used only "\\n" as newline I get CRLF in the file.
But when saving an XML (using xmlDocumentToFile(docNum,fileName)) it is saved with only LF.
The reason is that some service personell have to edit this settings-xml from time to time. And windows nodepad (not notepad++) displays it on one line when it is only LF.
Following Ideas (I'm not on windows so I did not test it):
- When the personell uses WinCC_OA itself to edit the file, you could try the CTRL function textEditor() instead
- When this does not work, try using xmlDocumentToString() and then do a
f = fopen(name, "w"); fprintf(f, "%s", theString); fclose(f);
I assume this will create CRLF on windose