コード例 #1
0
        public static CommentsDocument Parse(XmlDocument xmlDoc, XmlNamespaceManager namespaceManager)
        {
            CommentsDocument commentsDoc = new CommentsDocument();

            commentsDoc.comments = CT_Comments.Parse(xmlDoc.DocumentElement, namespaceManager);
            return(commentsDoc);
        }
コード例 #2
0
ファイル: CommentsDocument.cs プロジェクト: ngnono/npoi
 public static CommentsDocument Parse(XmlDocument xmlDoc, XmlNamespaceManager NameSpaceManager)
 {
     CommentsDocument commentsDoc = new CommentsDocument();
     commentsDoc.comments = new CT_Comments();
     foreach (XmlElement node in xmlDoc.SelectNodes("//d:authors/d:author", NameSpaceManager))
     {
         commentsDoc.comments.authors.AddAuthor(node.InnerText);
     }
     foreach (XmlElement node in xmlDoc.SelectNodes("//d:commentList/d:comment", NameSpaceManager))
     {
         var comment = commentsDoc.comments.commentList.AddNewComment();
         comment.authorId = uint.Parse(node.GetAttribute("authorId"));
         comment.@ref = node.GetAttribute("ref");
         comment.text = CT_Rst.Parse(node.ChildNodes[0], NameSpaceManager);
     }
     return commentsDoc;
 }
コード例 #3
0
        public static CommentsDocument Parse(XmlDocument xmlDoc, XmlNamespaceManager NameSpaceManager)
        {
            CommentsDocument commentsDoc = new CommentsDocument();

            commentsDoc.comments = new CT_Comments();
            foreach (XmlElement node in xmlDoc.SelectNodes("//d:authors/d:author", NameSpaceManager))
            {
                commentsDoc.comments.authors.AddAuthor(node.InnerText);
            }
            foreach (XmlElement node in xmlDoc.SelectNodes("//d:commentList/d:comment", NameSpaceManager))
            {
                CT_Comment comment = commentsDoc.comments.commentList.AddNewComment();
                comment.authorId = uint.Parse(node.GetAttribute("authorId"));
                comment.@ref     = node.GetAttribute("ref");
                comment.text     = CT_Rst.Parse(node.ChildNodes[0], NameSpaceManager);
            }
            return(commentsDoc);
        }
コード例 #4
0
 public static CommentsDocument Parse(XmlDocument xmlDoc, XmlNamespaceManager namespaceManager)
 {
     CommentsDocument commentsDoc = new CommentsDocument();
     commentsDoc.comments = CT_Comments.Parse(xmlDoc.DocumentElement, namespaceManager);
     return commentsDoc;
 }