Esempio n. 1
0
        // -------------------------------------
        //              doProcessYellowIssues
        // -------------------------------------

        private void doProcessYellowIssues(string pageFileName, string text)
        {
            HtmlDocument htmlDocument = new HtmlDocument();
            htmlDocument.LoadHtml(text);
            //
            string relFileName = pageFileName.Substring(Globals.OutSettings.DocOutDir.Length);
            //
            HtmlNodeCollection markNodes = htmlDocument.DocumentNode.SelectNodes("//mark");
            if ((markNodes != null) && (markNodes.Count > 0))
            {
                IssueDirNode issueDirNode = this.adjustIssueDirNode(relFileName);
                //
                foreach (HtmlNode markNode in markNodes)
                {
                    IssueItemNode issueItemNode = null;
                    //
                    HtmlNode parentDdNode = this.calcParentDdNode(markNode);
                    if (parentDdNode != null)
                    {
                        HtmlNode titleNode = this.calcDtTitleNode(parentDdNode);
                        if (titleNode != null)
                        {
                            issueItemNode = new IssueItemNode(relFileName, titleNode.Id, titleNode.InnerText, markNode.InnerText);
                        }
                    }
                    //
                    if (issueItemNode == null)
                    {
                        HtmlNode parentWithId = this.calcParentWithId(markNode);
                        if (parentWithId != null)
                        {
                            issueItemNode = new IssueItemNode(relFileName, parentWithId.Id, "???", markNode.InnerText);
                        }
                    }
                    //
                    if (issueItemNode == null)
                    {
                        issueItemNode = new IssueItemNode(relFileName, null, "???", markNode.InnerText);
                    }
                    //
                    issueDirNode.AddItem(issueItemNode);
                }
            }
        }
Esempio n. 2
0
 public void AddItem(IssueItemNode itemNode)
 {
     this.ItemNodes.Add(itemNode);
 }