public static FactoryNode Read(string filename) { FactoryReader reader = new FactoryReader(); XDocument doc = XDocument.Load(filename); // XElement element = doc.Element("root"); FactoryNode root = reader.ReadFactory(null, element); return(root); }
public static Factory Build(string name) { string filename = "../../../Content/production/" + name + ".xml"; if (!File.Exists(filename)) { return(null); } FactoryNode root = FactoryReader.Read(filename); return(BuildFactory(null, root)); }