![]() That involves special code for streaming, but you could place that code in class attributes if your arrays are not too specific, and handle everything in one of your root classes. I don't know the NativeXML components, but if they are based on TWriter/TReader, another option could be to use, this allows you to define your own properties, and you can then stream whatever you wish, however you wish. Their container has to be a subclass of TCollection, and their items have to be a subclass of TCollectionItem. However that imposes severe constraints on your arrays, ie. If you want to stay with the TComponent mechanism (or a pure RTTI-based streaming), one option is to use TCollection, which does get streamed 'as an array'. Indexed properties are not exposed to RTTI (and still aren't in Delphi XE), and they are not streamed by TComponent either. ![]() ![]() This feature is only available for D5 and up. This is done by iterating through all of the objects' published properties by use of RTTI (runtime type information). Unique feature: Store, read and create any TPersistent object to/from XML directly (see Example5). ![]() Quote: A native Delphi XML parser and writer. For example, you can serialize a class that simply consists of public. XML serialization can take more than one form, from simple to complex. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |