Example #1
0
        public void AddAttr(string name, string value)
        {
            AttributeEntity addAttr = new AttributeEntity();

            addAttr.SetAttrName(name);
            addAttr.SetAttrValue(value);
            attrList.Add(addAttr);
        }
Example #2
0
        private void ParseAttributes(XmlReader reader, NodeEntity currentNode)
        {
            int iLoopCount = reader.AttributeCount;

            for (int i = 0; i < iLoopCount; i++)
            {
                reader.MoveToAttribute(i);
                string          attrName  = reader.LocalName;
                string          attrValue = reader.GetAttribute(attrName);
                AttributeEntity attr      = new AttributeEntity();
                attr.SetAttrName(attrName);
                attr.SetAttrValue(attrValue);
                currentNode.AddAttr(attr);
            }
        }