示例#1
0
 public static T LoadFromXml <T>(string filename, int maxversion, out int actualversion)
 {
     try
     {
         // load XML document and parse it
         // deserialize a Test1 instance having a version number of at most maxversion
         T obj = (T)CustomXmlDeserializer.Deserialize(XmlFileReader.ReadXmlFile(filename).OuterXml, maxversion, out actualversion);
         return(obj);
     }
     catch (Exception ex)
     {
         throw new Exception("Fehler beim Lesen von Xml Datei", ex);
     }
 }
示例#2
0
 public static Type GetTypeFromXml(string filename)
 {
     return(CustomXmlDeserializer.GetTypeOfContent(XmlFileReader.ReadXmlFile(filename).OuterXml));
 }