1234567891011121314151617181920212223242526272829303132 |
- using System;
- using System.IO;
- using System.Xml;
- namespace WebAPIBase.NetCore.BusinessCore
- {
- public sealed class XmlDefineFileManage
- {
- private XmlDefineFileManage()
- {
- }
- public static XmlDocument GetXmlDoc(string fileName)
- {
- try
- {
- string text = ApplicationConfiguration.EntityDefinePath + fileName + ".xml";
- if (!File.Exists(text))
- {
- throw new ApplicationException(text + " 文件不存在");
- }
- XmlDocument xmlDocument = new XmlDocument();
- xmlDocument.Load(text);
- return xmlDocument;
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- }
- }
|