Are you writing your own XML importer/exporter, or using the built-in IntermediateSerializer? If you're writing your own, then you have the answer to your own question since you're the one implementing it.
Otherwise, I believe that the built-in IntermediateSerializer just knows to treat deserialized collections as collections and assumes that the named members of your top level objects that contain these collections are able to accept these objects as collection items, otherwise it'll bork. It'd be a pretty lame serializer if you couldn't instantiate subclasses to stick in a base class collection from XML.
I say "believe" because I haven't tried to examine the IL or anything like that. Just going based on my own futzing with it.
I put my first whack at a component system on github just recently, and this is what IntermediateSerializer (should be XNA 4, if not it's 3.1 and 4 likely exports similar data):
Here's a snippet:
<Level xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
You'll notice that IntermediateSerializer doesn't even bother specifying the type of
<Aspects>, presumably the Content XML importer knows what to do when it sees a collection.
This is an XML file I generated using the IntermediateSerializer documented on Shawn Hargreaves' blog. The solution is split up into the Content project, and Engine project, a Game project and one Editor project. The only difference between Editor and Game is some #ifdefs that determine whether to export the current state of the scene as as an XML file, or to load an XML file from the Content project so I could see exactly how it was getting serialized and deserialized.
Here's the stripped down game class to illustrate what I'm talking about:
class Game1 : Microsoft.Xna.Framework.Game
private Level level; // Level class contains Entities, which are built out of Aspects (component system)
/// LoadContent will be called once per game and is the place to load
/// all of your content.
protected override void LoadContent()
FirstLevel.LoadFirstLevel(level, this); // Static class method that instantiates game objects
level = Content.Load<Level>("xnaXmlTest2");
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Update(GameTime gameTime)
currentGameTime = gameTime;
var keyboardState = Keyboard.GetState();
if (levelMode == SAVE_MODE)
Entity player = Entity.GetEntityByID(FirstLevel.PlayerID);
string filePath = Content.RootDirectory + @"\..\..\..\..\Content\xnaXmlTest2.xml";
FileStream file = new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite);
IntermediateSerializer.Serialize<Level>(XmlWriter.Create(file), level, filePath);