private void Descend()
 {
     this.Update();
     TreeNode node = new XmlTreeNode("", this.linePositions[this.reader.LineNumber - 1]);
     node.Tag = this.current.Tag;
     this.current.Nodes.Add(node);
     this.current = node;
 }
示例#2
0
        private void Update()
        {
            XmlTreeNode node1 = current as XmlTreeNode;

            if (node1 != null)
            {
                node1.EndPosition = linePositions[reader.LineNumber];
            }
            if (name != null)
            {
                StringBuilder builder1 = new StringBuilder();
                for (int num1 = 0; num1 < attrNames.Count; num1++)
                {
                    builder1.Append(" " + attrNames[num1] + " = " + attrValues[num1]);
                }
                current.Text = name + builder1.ToString();
                attrNames.Clear();
                attrValues.Clear();
                name = null;
            }
        }
        private void Update()
        {
            XmlTreeNode current = this.current as XmlTreeNode;

            if (current != null)
            {
                current.EndPosition = this.linePositions[this.reader.LineNumber];
            }
            if (this.name != null)
            {
                StringBuilder builder = new StringBuilder();
                for (int i = 0; i < this.attrNames.Count; i++)
                {
                    builder.Append(" " + this.attrNames[i] + " = " + this.attrValues[i]);
                }
                this.current.Text = this.name + builder.ToString();
                this.attrNames.Clear();
                this.attrValues.Clear();
                this.name = null;
            }
        }
 private void Descend()
 {
     Update();
     TreeNode node1 = new XmlTreeNode("", linePositions[reader.LineNumber - 1]);
     node1.Tag = current.Tag;
     current.Nodes.Add(node1);
     current = node1;
 }