[Serializable]
[XmlRoot("all")]
public class all
{
[XmlArray("1")]
public ArrayList jedna { get; set; }
[XmlAttribute("2")]
public string dva { get; set; }
[XmlAttribute("3")]
public string tri { get; set; }
}
class Program
{
static void Main(string[] args)
{
all every = new all() { jedna = new ArrayList() { 1, 2, 3, 5 }, dva = "HODNOTA2", tri = "HODNOTA3" };
var ms = new System.IO.MemoryStream();
XmlSerializer xml = new XmlSerializer(typeof(all));
xml.Serialize(ms, every);
System.IO.File.WriteAllBytes("C:\\Serialization.xml", ms.ToArray());
Console.ReadKey();
}
}