How can I encode a stream so that it can be stored in an XML file?

I am working with QuantumGrid 6 from Devexpress. I need to save the grid settings in the xml configuration file. Unfortunately, the grid does not allow the use of XML as a storage option. However, I can export the settings to the stream.

I am going to export to a stream and then convert the stream to text and store it as an xml value. I assume that the text should contain only printable characters, and it would be nice if it were somehow compressed.

Can anyone suggest a stream encoding method?

+3
source share
3 answers

IdEncoderMIME/IdDecoderMime Indy Misc. .

+3

SimpleStorage, XML. .

SimpleStorage

, . , , :

SrcStorage.Ensure('Data').Filter('gzip').AsBinary.LoadFromStream(MemoryStream);

base64 , , gzip .

, :

SrcStorage := CreateStorage('BinaryStorage'); SrcStorage.Ensure('Data').Filter('gzip').AsBinary.LoadFromStream(MemoryStream); SrcStorage.SaveToFile('Data.xml');

OmniXML XML- delphi. .

+3

, DIMimeStreams, tStringStream, stream.datastring . , , LockBox, MIME. LockBox, 2009 , - songbeamer. , , , mime.

0

Source: https://habr.com/ru/post/1712925/


All Articles