private string ConvertToXML(IFileModels file) { try { string json = file.ReadFile(); var xml = JsonConvert.DeserializeXmlNode(json); return(xml.OuterXml); } catch (Exception ex) { throw ex; } }
private string ConvertToJSON(IFileModels file) { try { string xml = file.ReadFile(); var xmldoc = new System.Xml.XmlDocument(); xmldoc.LoadXml(xml); return(JsonConvert.SerializeXmlNode(xmldoc)); } catch (Exception ex) { throw ex; } }