XML Serializtation in VB

tapir

New Member
I have a class "Product". Each Product has a Name. It consists of a list of "Widgets". Each Widget has a Number. Each Widget consists of a list of Widgets again (variable depth). At the very end there is one or multiple "Sockets", each of which has a SocketID and a Length. In other words, the last Widget does not consist of yet another Widget but of Sockets. The XML output I want looks something like this.I have tried any trick I could think of to define my class Product for serialization (ArrayList, List(of Widget), XMLInclude, etc. to achieve that result - no success. Has anybody run into this problem before?
 
Back
Top