求大神帮忙!怎么用C#编程将xml格式数据文件写入SQL数据库

求大神帮忙!!!如何用C#编程将xml格式数据文件写入SQL数据库
如何用C#编程将xml格式数据文件写入SQL数据库?请给个例子
------解决方案--------------------
可以使用linq  to xml  读取你的xml文件到一个实体类集合;再循环添加到数据库。
------解决方案--------------------

简单的例子:
tt.xml
<?xml version="1.0" encoding="utf-8"?>
<Persons>
<Person>
<Name>张三</Name>
<Age>25</Age>
</Person>
</Persons>

   private void button5_Click(object sender, EventArgs e)
        {          
            DataSet ds = new DataSet();
            ds.ReadXml("tt.xml");
            string name = ds.Tables["Person"].Rows[0]["Name"].ToString();
            string age = ds.Tables["Person"].Rows[0]["Age"].ToString();           
        }
        public void insertdata(string name, string age)//插入SQL数据库  
        {
            SqlConnection con = new SqlConnection("Data Source=10.168.1.5;Initial Catalog=data;User ID=sa;password=sa;Integrated Security=False");
            con.Open();
            SqlCommand cmd = new SqlCommand(string.Format("select Count(*) from newtable where Name= '{0}'", name), con);
            if ((int)cmd.ExecuteScalar() > 0)
            {
                listBox1.Items.Add(name + " 数据已经存在");
            }
            else
            {
                string sql = "insert into newtable(name,age) values('" + name + "','" + age + "')";
                cmd.CommandText = sql;
                cmd.ExecuteNonQuery();
                listBox1.Items.Add(name + " 成功添加");
            }
            cmd.Dispose();
            con.Close();
        }



------解决方案--------------------
漏了:
 DataSet ds = new DataSet();
            ds.ReadXml("tt.xml");
            string name = ds.Tables["Person"].Rows[0]["Name"].ToString();
            string age = ds.Tables["Person"].Rows[0]["Age"].ToString();
            insertdata(name, age);