public XmlFileCreator(XmlFileHelper.XmlFileType type,String fileName) { FileName = fileName; doc = new XmlDocument(); root = doc.CreateElement("Root"); String typeStr = XmlFileHelper.getTypeString(type); root.SetAttribute("type",typeStr); doc.AppendChild(root); }
public XmlFileCreator(XmlFileHelper.XmlFileType type, String fileName) { FileName = fileName; doc = new XmlDocument(); root = doc.CreateElement("Root"); String typeStr = XmlFileHelper.getTypeString(type); root.SetAttribute("type", typeStr); doc.AppendChild(root); }
public XmlFileInterpretor(String fileName) { doc = new XmlDocument(); doc.Load(fileName); root = (XmlElement)doc.SelectSingleNode("Root"); map = new Hashtable(); String type = root.GetAttribute("type"); map.Add("Type", XmlFileHelper.getStringType(type)); foreach (XmlElement ele in root.ChildNodes) { map.Add(ele.Name, ele.InnerText); } }