示例#1
0
        public void ParsingXml(FileInfo f, TypeFileComplaint typefile)
        {
            using (StreamReader sr = new StreamReader(f.ToString(), Encoding.Default))
            {
                var ftext = sr.ReadToEnd();
                ftext = ClearText.ClearString(ftext);
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(ftext);
                string  jsons = JsonConvert.SerializeXmlNode(doc);
                JObject json  = JObject.Parse(jsons);
                switch (typefile)
                {
                case TypeFileComplaint.Complaint:
                    Complaint44 a = new Complaint44(f, json);
                    a.Parsing();
                    break;

                case TypeFileComplaint.Cancel:
                    ComplaintCancel b = new ComplaintCancel(f, json);
                    b.Parsing();
                    break;

                case TypeFileComplaint.Suspend:
                    ComplaintSuspend c = new ComplaintSuspend(f, json);
                    c.Parsing();
                    break;
                }
            }
        }
示例#2
0
 public void ParsingXml(FileInfo f, TypeFileBank typefile)
 {
     using (StreamReader sr = new StreamReader(f.ToString(), Encoding.Default))
     {
         var ftext = sr.ReadToEnd();
         ftext = ClearText.ClearString(ftext);
         XmlDocument doc = new XmlDocument();
         doc.LoadXml(ftext);
         string  jsons = JsonConvert.SerializeXmlNode(doc);
         JObject json  = JObject.Parse(jsons);
         switch (typefile)
         {
         case TypeFileBank.Bank:
             Bank44 b = new Bank44(f, json);
             b.Parsing();
             break;
         }
     }
 }