+10  A: 

I think you haven't grouped by day; perhaps something like:

var el = new XElement("Days",
    from z in listKD
    group z by z.day into tmp
    select new XElement("Day",
        new XAttribute("id", tmp.Key),
        from item in tmp
        select new XElement("clock",
            new XAttribute("id", item.c),
            new XElement("s1", item.S1),
            new XElement("s2", item.S2),
            new XElement("s3", item.S3))
            ));
string s = el.ToString(); // or save etc


Update re comment; to reverse it, something like:

        XElement parsed = XElement.Parse(s);
        var newList = (from day in parsed.Elements("Day")
                       from clock in day.Elements("clock")
                       select new zil
                       {
                           day = (string)day.Attribute("id"),
                           c = (string)clock.Attribute("id"),
                           S1 = (string)clock.Element("S1"),
                           S2 = (string)clock.Element("S2"),
                           S3 = (string)clock.Element("S3")
                       }).ToList();

To filter to a specific day:

                       from day in parsed.Elements("Day")
                       where (string)day.Attribute("id") == "Mon"
                       from clock in day.Elements("clock")
                       ...
Marc Gravell
Thanks. It's work
Ali
If only I had found this yesterday... Nice and simple solution to a problem that I had to solve by looping over the list.
TehOne
Ok. How can I read the clock and [s1,s2,s3,s1...] from xml file for day. examp day=mon...
Ali
A: 
   [XmlArray("Zils"), XmlArrayItem("Zil", typeof(zil))]
   public List<zil> listKD = new List<zil>();
Drony