Esempio n. 1
0
 /// <summary>
 /// 获取同一个Class的内容
 /// </summary>
 /// <param name="cssKey">css样式关键字</param>
 /// <returns></returns>
 public List <string> GetClassTxt(string cssKey)
 {
     try
     {
         List <string> returnValue = new List <string>();
         if (!doc.Exists(cssKey))
         {
             return(null);
         }
         var values = doc.Find(cssKey);
         if (values == null)
         {
             return(null);
         }
         foreach (var item in values)
         {
             returnValue.Add(item.InnerText());
         }
         return(returnValue);
     }
     catch
     {
         return(null);
     }
 }