Exemple #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;
                }
            }
        }
Exemple #2
0
        public override void Bolter(FileInfo f, TypeFileComplaint typefile)
        {
            if (!f.Name.ToLower().EndsWith(".xml", StringComparison.Ordinal))
            {
                return;
            }

            try
            {
                ParsingXml(f, typefile);
            }
            catch (Exception e)
            {
                Log.Logger("Ошибка при парсинге xml", e, f);
            }
        }
Exemple #3
0
 public virtual void Bolter(FileInfo f, TypeFileComplaint typefile)
 {
 }