XML ASP.Net Tutorial

<%@  import Namespace="System" %>
<%@ import Namespace="System.Xml" %>
<%@ Page Language="C#" %>

    XmlTextReader _Reader; 
    
    public void Page_Load(Object Source, EventArgs E)
    {
        try{
            _Reader = new XmlTextReader(Server.MapPath("Data.xml"));
            ReadDocument(_Reader);
        }
        catch (Exception _Error){
            ErrorLabel.Text = _Error.Message;
        }
        finally{
            _Reader.Close();
        }
    
    }
    
    public void ReadDocument(XmlTextReader _XmlReader)
    {
      System.Text.StringBuilder sb = new System.Text.StringBuilder(100);
    String space3 = "   ";
    String space = " ";
        while (_XmlReader.Read())
        {
            switch(_XmlReader.NodeType)
            {
              case XmlNodeType.Element:
                  sb.Append("Element: ");
                  sb.Append(_XmlReader.Name);
                  sb.Append("
");
              
                  if (_XmlReader.AttributeCount > 0)
                  {
                      while (_XmlReader.MoveToNextAttribute())
                      {
                         sb.Append(space3);
                         sb.Append("Attribute Name: ");
                         sb.Append(_XmlReader.Name);
                         sb.Append(space);
                         sb.Append("Attribute Value: ");
                         sb.Append(_XmlReader.Value);
                         sb.Append("
");
                      }
                  }
              break;
    
              case XmlNodeType.Text:
                  sb.Append(space3);
                  sb.Append("Value: ");
                  sb.Append(_XmlReader.Value);
                  sb.Append("
");
              break;
            }
        }
    OutputLiteral.Text = sb.ToString();   
    }


  
    Using the XmlTextReader