First question on Stackoverflow (.Net 2.0):
So I am trying to return an XML of a List with the following:
public XmlDocument GetEntityXml()
{
If I understand correctly, you want the root of the document to always be the same, whatever the type of element in the collection ? In that case you can use XmlAttributeOverrides :
XmlAttributeOverrides overrides = new XmlAttributeOverrides();
XmlAttributes attr = new XmlAttributes();
attr.XmlRoot = new XmlRootAttribute("TheRootElementName");
overrides.Add(typeof(List), attr);
XmlSerializer serializer = new XmlSerializer(typeof(List), overrides);
List parameters = GetAll();
serializer.Serialize(xmlWriter, parameters);