* * *

Author Topic: [SOLVED] Using TFileStream to write plan old text files  (Read 834 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 4439
Re: Using TFileStream to write plan old text files
« Reply #15 on: August 05, 2017, 10:59:58 am »
Ah, I see what you mean. Might suit some others but certainly not me. I'm writing out some xml to be read in another application so must be plain old text file I'm afraid.
If you are writing xml, just use a TFilestream and  write buffered, do not use the string functions in that case.
Point is: XML doesn't care about line endings or zero termination at all, so provided your other application expects valid XML that should simply work.
You will loose some text formatting (not within the XML tags, though), but that formatting is not part of XML itself..... It is just to make it easy on the eyes.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus