public static StaticData Read(string filename) { var staticData = new StaticData(); var xmlDocument = new XmlDocument(); using (var stream = File.OpenRead(filename)) { xmlDocument.Load(stream); } staticData.TileInfos = TileInfos.Read(xmlDocument); staticData.WallInfos = WallInfo.Read(xmlDocument); staticData.GlobalColors = GlobalColors.Read(xmlDocument); staticData.ItemPrefixes = ItemPrefix.Read(xmlDocument); staticData.ItemInfos = ItemInfo.Read(xmlDocument); staticData.NpcInfoList = NpcInfo.Read(xmlDocument); return(staticData); }