System.Xml.XmlTextReader.MoveToNextAttribute C# (CSharp) Method

MoveToNextAttribute() public method

public MoveToNextAttribute ( ) : bool
return bool
        public override bool MoveToNextAttribute()
        {
            return _impl.MoveToNextAttribute();
        }

Usage Example

Example #1
0
File: Hall.cs Project: ffblk/epam
 public static void ListPlaces()
 {
     string siteDir = HttpContext.Current.Server.MapPath(@"\");
     XmlTextReader reader = new XmlTextReader(siteDir + InputFile);
     Hall pList = new Hall();
     Places p = null;
     int category = 0;
     int series = 0;
     int place = 0;
     while (reader.Read())
     {
         if (reader.NodeType == XmlNodeType.Element)
         {
             switch (reader.Name)
             {
                 case "category":
                     reader.MoveToNextAttribute();
                     category = Int32.Parse(reader.Value);
                     break;
                 case "row":
                     reader.MoveToNextAttribute();
                     series = Int32.Parse(reader.Value);
                     break;
                 case "seat":
                     reader.Read();
                     place = Int32.Parse(reader.Value);
                     p = new Places(series, place, category);
                     pList.Add(p);
                     break;
             }
         }
     }
 }
All Usage Examples Of System.Xml.XmlTextReader::MoveToNextAttribute