예제 #1
0
파일: XmlFileHelper.cs 프로젝트: hxd3/GTL2
 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);
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
            }
        }