Пример #1
0
        public NodeEntity CloneWithoutChildren()
        {
            NodeEntity ret = new NodeEntity();

            attrList.ForEach(v => {
                ret.AddAttr(v.Clone());
            });

            ret.SetNodeName(nodeName);
            ret.SetNodeID(nodeId);
            ret.SetDepth(depth);
            ret.SetNodeValue(nodeValue);
            ret.Comment(isComment);

            return(ret);
        }
Пример #2
0
        protected void ParseComment(XmlReader reader)
        {
            if (reader.NodeType != XmlNodeType.Comment)
            {
                return;
            }

            NodeEntity newNode = new NodeEntity();

            newNode.SetNodeName(@"Comment");
            newNode.SetNodeID(currentNodeId);
            newNode.SetDepth(depth);
            newNode.SetNodeValue(reader.Value.Trim());
            newNode.Comment(true);
            currentNodeId++;
            node.FindTail(depth).AddChild(newNode);
        }