Cannot deserialize an array of objects (of variable type)

Posted by Moripi under XML on 5/3/2011 | Points: 10 | Views : 2518 | Status : [Member] | Replies : 0
Hi helpful folks and gurus

Hey folks, I'm programming an application in Visual Studio 2010, namely in I have been developing an application which uses a derived class inherited from TreeView, with the aim of putting custom objects on the nodes. The method I have been using is to have a variable array against the node (of type object) which contains variables in custom classes to contain each of the variables associated with the node.

The two problems I had to overcome were, how to serialize a TreeView, and how to serialize an array of objects (of variable type). Good thing is I overcame both of these with some work of some other folks (and 3 days of my own work).


Object Array (NOT of variable type). adapted to variable type:

Serialization works a charm.. Deserialization naddah.. Can find no sufficent documentation for me to debug and work on manual deserialization (of only one variable, the variable array of objects). All others are handled by the regular deserializer.

Effectively the xmlserializerforunknown URL provided a solution which manually handles both the type handling and the handling of the object array.

The main error I'm having lies in the ReadXml, function. I just can't align the xml with the code.

Here is the Code and the XML. (see earlier URLs for the inline which have been edited out for brevity)

If someone can assist with the ReadXml to process the XML or even tell me how to do it without using custom Serialization (please please i'm sure its possible!!)

Thanks in advance folks. Its a tough one.


<addendum> uh.... the forum is explicitly not allowing me to post given the length of the post. This is ridiculous, and I'm moving to a different forum... hmm perhaps food for thought?


(No response found.)

Login to post response