public IEnumerable<ShowingDateModel> LoadDateTimeFromCinemaMovie(Stream s)
        {
            List<ShowingDateModel> result = new List<ShowingDateModel>();
            StreamReader reader = new StreamReader(s, Encoding.UTF8);
            HtmlDocument xdoc = new HtmlDocument();
            xdoc.Load(reader.BaseStream, true);
            HtmlNodeCollection dates = xdoc.DocumentNode.SelectNodes(DATECOLLECTION_MOVIE_SHOWTIME_XPATH);
            HtmlNodeCollection times = xdoc.DocumentNode.SelectNodes(TIMECOLLECTION_MOVIE_SHOWTIME_XPATH);

            if (dates != null && times != null)
            {
                foreach (HtmlNode date in dates)
                {
                    int index = dates.GetNodeIndex(date);
                    HtmlNode time = times[index];
                    HtmlNodeCollection sessions =
                        time.SelectNodes(string.Format(TIME_MOVIE_SHOWTIME_XPATH, time.XPath)) ??
                        time.SelectNodes(string.Format(TIMEREADONLY_MOVIE_SHOWTIME_XPATH, time.XPath));
                    ShowingDateModel dateTime = new ShowingDateModel { ShowingDate = HttpUtility.HtmlDecode(date.InnerText) };

                    foreach (HtmlNode session in sessions)
                    {
                        ShowingTimeModel sessionTime = new ShowingTimeModel
                                                           {
                                                               Id = "",
                                                               DateTime = HttpUtility.HtmlDecode(session.InnerText)
                                                           };
                        dateTime.ShowingTimes.Add(sessionTime);
                    }
                    result.Add(dateTime);
                }
            }
            return result;
        }
 public IEnumerable<ShowingDateModel> LoadDateTimeFromCinemaMovie(Stream s)
 {
     List<ShowingDateModel> result = new List<ShowingDateModel>();
     StreamReader reader = new StreamReader(s, Encoding.UTF8);
     HtmlDocument xdoc = new HtmlDocument();
     xdoc.Load(reader.BaseStream, true);
     HtmlNodeCollection dates = xdoc.DocumentNode.SelectNodes("//date[@*]");
     if (dates == null)
         return null;
     foreach (HtmlNode date in dates)
     {
         ShowingDateModel dateTime = new ShowingDateModel { ShowingDate = date.GetAttributeValue("name", string.Empty) };
         HtmlNodeCollection times = date.ChildNodes;
         foreach (HtmlNode time in times)
         {
             ShowingTimeModel sessionTime = new ShowingTimeModel
             {
                 Id = time.SelectSingleNode(time.XPath + "/id[1]").InnerText,
                 DateTime = time.SelectSingleNode(time.XPath + "/date[1]").InnerText
             };
             dateTime.ShowingTimes.Add(sessionTime);
         }
         result.Add(dateTime);
     }
     return result;
 }