Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1.         public static void listarAulas()
  2.         {
  3.             try
  4.             {
  5.                 XmlDocument listaXML = ConsultorWeb.consultaXML(Config.getInstance().getURLListaAulas());
  6.                 XmlReader reader = XmlReader.Create(new System.IO.StringReader(listaXML.InnerXml));
  7.                 aulas = new String[listaXML.FirstChild.ChildNodes.Count];
  8.                 int i = 0;
  9.                 while (reader.Read())
  10.                     if (reader.NodeType == XmlNodeType.Element && reader.Name == "aula")
  11.                     {
  12.                         aulas[i] = reader.GetAttribute("nombre").ToUpper();
  13.                         Console.WriteLine(i + " .- " + aulas[i++]);
  14.                     }
  15.             }
  16.             catch (Exception e)
  17.             {
  18.                 lanzarExcepcion(e);
  19.             }
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement