Hi,
I have a data structure which is serialzied into an xml like this:
<?xml version="1.0" encoding="utf-8"?>
<Storage xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Frames>
<Frame Index="0">
<Tags>
<anyType xsi:type="ProjectInfo">
<ProjectType>MediaTags.Projects.FACS</ProjectType>
<MediaFile>C:\develop\JustForFun\Dyade07divx.avi </MediaFile>
</anyType>
</Tags>
</Frame>
<Frame Index="98">
<Tags>
<anyType xsi:type="FacsTag">
<id>7</id>
</anyType>
</Tags>
</Frame>
</Frames>
</Storage>
If I try to deserialize this structure, everything works fine up to the
level of Tags. Tags is a class, which implements IEnumerable and the
required Add(object o) method.
But Add is not called with instances of ProjectInfo and FacsTag. It's
called with arrays of objects. The first entry is the xsi:type Attribute
followed by the child nodes of the anyType tag.
Is that correct behavior? I would have expected that the ProjectInfo and
FacsTag objects are deserialzied too. Is there something I have to do to
enable this functionality?
regards,
Achim