//从xml文件中读取发件箱信息
private void readerXmlOutBox()
{
if (xmlDo == null)
xmlDo = new XmlDocument();
xmlDo.Load(path + @"\MobileBackup.xml");
XmlNode xmlNode = xmlDo.SelectSingleNode("SHT_MOBILE");
XmlNodeList xmlNodeList = xmlNode.ChildNodes;
DataTable dt = new DataTable();
dt.Columns.AddRange(
new DataColumn[]{
new DataColumn("mobile",typeof(string)),
new DataColumn("message",typeof(string)),
new DataColumn("time",typeof(string))
});
foreach (XmlNode xn in xmlNodeList)
{
XmlElement xmlEm = (XmlElement)xn;
if (xmlEm.GetAttribute("flag") == "SHToutBox")
{
DataRow dr = dt.NewRow();
dr["mobile"] = xn["mobile"].InnerText;
dr["message"] = xn["message"].InnerText;
dr["time"] = xn["time"].InnerText;
dt.Rows.Add(dr);
}
}
this.insertFillOutBox(dt);
}