public static CommentsDocument Parse(XmlDocument xmlDoc, XmlNamespaceManager namespaceManager) { CommentsDocument commentsDoc = new CommentsDocument(); commentsDoc.comments = CT_Comments.Parse(xmlDoc.DocumentElement, namespaceManager); return(commentsDoc); }
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; }
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); }
public static CommentsDocument Parse(XmlDocument xmlDoc, XmlNamespaceManager namespaceManager) { CommentsDocument commentsDoc = new CommentsDocument(); commentsDoc.comments = CT_Comments.Parse(xmlDoc.DocumentElement, namespaceManager); return commentsDoc; }