Read An XML File : XML Read : XML C# Source Code


Custom Search

C# Source Code » XML » XML Read »

 

Read An XML File








    

/*
 * C# Programmers Pocket Consultant
 * Author: Gregory S. MacBeth
 * Email: gmacbeth@comporium.net
 * Create Date: June 27, 2003
 * Last Modified Date:
 * Version: 1
 */
using System;
using System.IO;
using System.Xml;


namespace Client.Chapter_22___XML
{
  public class ReadAnXMLFile
  {
    private const string doc = "Test.xml";
    static void Main(string[] args)
    {
      XmlTextReader reader = null;

      // Load the file with an XmlTextReader
      reader = new XmlTextReader(doc);

      // Read the File
      while (reader.Read())
      {
        //TODO - 
      }

      if (reader != null)
        reader.Close();
    }
  }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo XML
» XML Read