I can access properties except tkClass of a class using RTTI
Procedure WriteClass(MyClass: TPersistent; Section: String = '');
Var
PropList: PPropList;
PropInfo: PPropInfo;
PropCount, i: Integer;
Begin
PropCount:= GetPropList(MyClass.ClassInfo, tkProperties, nil);
GetMem(PropList, PropCount *SizeOf(PPropInfo));
Try
GetPropList(MyClass.ClassInfo, tkProperties, PropList);
For i:= 0 to PropCount-1 do
Begin
PropInfo:= PropList^[i];
ShowMessage(Section+PropInfo^.Name+' = '+VarToStr(GetPropValue(MyClass, PropInfo^.Name)))
//For Type: GetEnumName(TypeInfo(TTypeKind), Ord(PropInfo^.PropType^.Kind));
End;
Finally
FreeMem(PropList);
End;
End;
I tried very hard, but couldn't access the properties of nested classes.
I want to do this using xml and of course the bidet will read.
A code or example would be very helpful.