Use different XmlReadMode to read xml : XmlReadMode « XML « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Xml;

    public class MainClass
    {
        public static void Main(){
            DataSet ds = new DataSet();
            XmlReadMode mode=XmlReadMode.Auto;
            mode = XmlReadMode.Auto;
            mode = XmlReadMode.DiffGram;
            mode = XmlReadMode.Fragment;
            mode = XmlReadMode.IgnoreSchema;
            mode = XmlReadMode.InferSchema;
            mode = XmlReadMode.ReadSchema;
            ds.ReadXml("yourFile", mode);
        }
    }








30.12.XmlReadMode
30.12.1.Use different XmlReadMode to read xml