I always felt this was missing from XmlSerializer.
Then like magic, along came DataContracts, which can be used to do roughly the same thing, except you now have the added option of preserveObjectReferences as a parameter of the constructor.
Great, this solves the problem right? well, yes but it also raises more :) the resulting xml for a simple structure like this:
This looks more complex because it uses reference attributes. Every serialized object is given an ID attribute. If that object is serialized again (i.e. from a circular reference) it will just use an attribute that says "i'm really object 54".
This makes it rather difficult to do XSLT and XPath with the result. So unless you don't mind resolving every node in a query, I've written implementations of XPathNavigator and XmlDocument to transparently resolve these references for you.
This now makes it possible to do the following with your serialized objects:
remember though, this also allows you to get your xslt in an infinite loop easily. be careful.