Delphi Serialize Object To Xml

Автор:
Delphi Serialize Object To Xml 3,1/5 2414 reviews

Hey, I want to serialize an object to xml with delphi 7, i searched but i didn't find a full solution, i think with HttpRio we can do it. Thank you in advance.

I had one problem with deserialisation. I had this: TPart1 = Class public field1: string; end; TPart = Class public part1: TPart1; end; I serialize and deserailize: all work fine. But now I want to add TPart2 to TPart like this: TPart1 = Class public field1: string; end; TPart2 = Class public field2: string; end; TPart = Class public part1: TPart1; part2: TPart2; end; And I’d like to deserialize from TPart XML who was serialized with old TPart (only TPart1) and it fail. Is there a way to make this?

JVCL is one choice, but if you prefer a small, self-contained library, there's OmniXML (Mozilla Public License 1.1, ). I've used it successfully in several projects, and I find it the simplest XML library to use in Delphi. OmniXML comes with 'OmniXMLPersistent' unit, which does what you need via RTTI, just like the JVCL solution does. // saving: pers: TPersistent; // SaveToFile is a class method, so no need to instantiate the object: TOmniXMLWriter.SaveToFile( pers, 'd: path file.xml', pfAttributes, ofIndent ); pfAttributes means properties will be stored as attributes of XML elements; ofIndent will produce a nicely indented code for readability. // loading: TOmniXMLWriter.LoadFromFile( pers, 'd: path file.xml' ).

Xda-developers Sony Ericsson Xperia Arc Xperia Arc Q&A, Help & Troubleshooting Any Arc S ADB drivers? By NoobSEowner XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Adb driver for sony ericsson xperia arc s lt18i.