Generic XML Deserialization into Undefined Objects
问题 I have a very long, very varied XML file that I am attempting to store portions of into a database. Now, I do not want to go through and hand-write 10,000 different objects to store the deserialized data into. Is there any way to define an Object based on what is found in the XML file? For instance, if I had: <objecttype1> <attr1>Some string of text</attr1> </objecttype1> <objecttype1> <attr2>123456789</attr2> </objecttype1> I would want an object similar to the following to be defined: