Exemplo n.º 1
0
        public RJOutline(String docs)
        {
            HTMLParser p = HTMLParser.GetByHTML(docs);

            NodeList nodes = p.GetFirstNode("id", "work_outline").Children;

            nodes.KeepAllNodesThatMatch(new TagNameFilter("tr"));

            for (int i = 0; i < nodes.Count; i++)
            {
                INode node = nodes.ElementAt(i);

                if (node != null)
                {
                    node.Children.RemoveMeaninglessNodes();
                    this.data.Add(node.FirstChild.ToPlainTextStringEx().Trim(), node.LastChild.ToDividedTextString(" ").TrimAll());
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获取作品名
 /// </summary>
 /// <returns>作品名</returns>
 public String GetWorkName()
 {
     return(p.GetFirstNode("id", "work_name").ToPlainTextStringEx().Trim());
 }