Beispiel #1
0
        public DateTime GetNodeDate(XmlNode xmlNode, string strElementName, DateTime dtDefault)
        {
            DateTime date = dtDefault;

            try
            {
                NodeContent content     = new NodeContent(strElementName);
                string      strDateTime = GetNodeContent(xmlNode, content);
                date = DateTimeExt.Parse(strDateTime);
            }
            catch (Exception ex)
            {
                Utils.DbgOutExc("FeedManager::GetNodeDate()", ex);
            }
            return(date);
        }
Beispiel #2
0
 /// <summary>
 /// Merges a non-empty element.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="value"></param>
 public void ReadElement(string name, string value, XmlNodeType nodeType)
 {
     if (name == "title")
     {
         m_strTitle = value;
     }
     else if (name == "link")
     {
         m_strLink = value;
     }
     else if (name == "pubDate")
     {
         Published = value;
     }
     else if (name == "comshak:rcvDate")
     {
         DateTime dtRcv = DateTimeExt.Parse(value);
         m_dtReceived = dtRcv;
     }
     else if (name == "comshak:retain")
     {
         m_strRetain = value;
     }
     else if (name == "author")
     {
         m_strAuthor = value;
     }
     else if (name == "description")
     {
         m_strDescription = value;
         if (nodeType == XmlNodeType.CDATA)
         {
             m_ncDescType = NCType.CDATA;
         }
     }
     else if (name == "category")
     {
         m_strCategory = value;
     }
     else
     {
         Utils.DbgOut("WARNING: Found unknown element {0} with value {1}", name, value);
     }
 }