R
Robert Jacobson
Hi,
If I have an XML file that stores its data in a hierarchical relationship,
is there a way to automatically "flatten" this relationship when I
deserialize it (using the XmlSerializer) to a collection of objects?
For example, assume that I have an XML file that contains the following data
for lastnames/firstnames:
Anderson
Bob
Ann
Jones
Betty
Fred
Mark
Smith
Paul
Gina
I'd like to deserialize this file into a set of "Person" objects, with each
Person containing both a lastname and firstname (rather than separate
"LastName" and "FirstName" objects in a hierarchical relationship):
Anderson, Bob
Anderson, Ann
Jones, Betty
Jones, Fred
Jones, Mark
Smith, Paul
Smith, Gina
Is there any Framework way to do this automatically (perhaps by using an
attribute), or do I need to write custom deserialization code to do this?
Many thanks.
If I have an XML file that stores its data in a hierarchical relationship,
is there a way to automatically "flatten" this relationship when I
deserialize it (using the XmlSerializer) to a collection of objects?
For example, assume that I have an XML file that contains the following data
for lastnames/firstnames:
Anderson
Bob
Ann
Jones
Betty
Fred
Mark
Smith
Paul
Gina
I'd like to deserialize this file into a set of "Person" objects, with each
Person containing both a lastname and firstname (rather than separate
"LastName" and "FirstName" objects in a hierarchical relationship):
Anderson, Bob
Anderson, Ann
Jones, Betty
Jones, Fred
Jones, Mark
Smith, Paul
Smith, Gina
Is there any Framework way to do this automatically (perhaps by using an
attribute), or do I need to write custom deserialization code to do this?
Many thanks.