System.Xml.XmlReader.MoveToAttribute C# (CSharp) Method

MoveToAttribute() public abstract method

public abstract MoveToAttribute ( string name ) : bool
name string
return bool
        public abstract bool MoveToAttribute(string name);

Same methods

XmlReader::MoveToAttribute ( string name, string ns ) : bool
XmlReader::MoveToAttribute ( int i ) : void

Usage Example

Example #1
0
 public void ReadLog(XmlReader reader)
 {
     while (reader.Read() && reader.NodeType != XmlNodeType.EndElement)
     {
         Dictionary<string, string> attributes = new Dictionary<string, string>();
         if (reader.Name == "ME")
         {
             if (reader.HasAttributes)
             {
                 for (int i = 0; i < reader.AttributeCount; i++)
                 {
                     reader.MoveToAttribute(i);
                     attributes.Add(reader.Name, reader.Value);
                 }
             }
             MouseEvent e = new MouseEvent(attributes);
             Evnts.AddLast(e);
             //do shit here
         }
         else if (reader.Name == "Clickthrough")
         {
                 if (reader.HasAttributes)
                 {
                     for (int i = 0; i < reader.AttributeCount; i++)
                     {
                         reader.MoveToAttribute(i);
                         attributes.Add(reader.Name, reader.Value);
                     }
                 }
             Clickthrough c = new Clickthrough(attributes);
             c.ReadLog(reader);
             Evnts.AddLast(c);
         }
     }
 }
All Usage Examples Of System.Xml.XmlReader::MoveToAttribute