日期:2014-05-20 浏览次数:21187 次
/// <summary>
/// Load XML
/// </summary>
/// <param name="xmlfilename"> xml file name</param>
/// <returns></returns>
public static XmlDocument LoadTaskxml(string xmlfilename)
{
try
{
if (!File.Exists(xmlfilename))
return null;
XmlDocument xmldocument = new XmlDocument();
xmldocument.Load(xmlfilename);
return xmldocument;
}
catch (Exception ex)
{
return null;
}
}
读出来的文件我用来
XmlDocument xmlDoc = AsyncTaskObjectManager.LoadTaskxml(XmlFilePath);
if (xmlDoc != null)
{
TaskInfo taskinfo = SerializeHelper<TaskInfo>.ToObjectFromXmlText(xmlDoc.OuterXml.ToString());
taskobject.TaskInfo = taskinfo;
return taskobject;
}
多进程时是否会有问题呢?