Ejemplo n.º 1
0
 public void CopyFrom(RssItem item)
 {
     if (item != null)
     {
         m_strTitle       = item.m_strTitle;
         m_strLink        = item.m_strLink;
         m_strDescription = item.m_strDescription;
         m_strAuthor      = item.m_strAuthor;
         m_strCategory    = item.m_strCategory;
         m_strRetain      = item.m_strRetain;
         m_dtPublished    = item.m_dtPublished;
         m_dtReceived     = item.m_dtReceived;
         m_Enclosure      = item.m_Enclosure;
         m_ncEncoding     = item.m_ncEncoding;
         m_ncDescType     = item.m_ncDescType;
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
 public NodeContent(string strXPath)
 {
     m_strXPath   = strXPath;
     m_ncEncoding = NCEncoding.String;
     m_ncType     = NCType.Text;
 }
Ejemplo n.º 4
0
 public NodeContent(string strXPath, NCEncoding encoding, NCType type)
 {
     m_strXPath   = strXPath;
     m_ncEncoding = encoding;
     m_ncType     = type;
 }
Ejemplo n.º 5
0
        public string GetNodeContent(XmlNode xmlNode, string strXPath, NCEncoding ncEncoding, NCType ncType)
        {
            NodeContent content = new NodeContent(strXPath, ncEncoding, ncType);

            return(GetNodeContent(xmlNode, content));
        }