public void DeserializeDemogFormDesignFromPath() { Setup.TimerStart("==>[] Started"); BaseType.ResetSdcImport(); //string path = @".\Test files\Demog CCO Lung Surgery.xml"; string path = Path.Combine(".", "Test files", "Demog CCO Lung Surgery.xml"); //if (!File.Exists(path)) path = @"/Test files/Demog CCO Lung Surgery.xml"; //string sdcFile = File.ReadAllText(path, System.Text.Encoding.UTF8); DemogFormDesignType FD = DemogFormDesignType.DeserializeFromXmlPath(path); var myXML = FD.GetXml(); Debug.Print(myXML); //Debug.Print(FD.GetJson()); var doc = new XmlDocument(); doc.LoadXml(myXML); var json = JsonConvert.SerializeXmlNode(doc); Debug.Print(json); doc = JsonConvert.DeserializeXmlNode(json); Debug.Print(doc.OuterXml); Setup.TimerPrintSeconds(" seconds: ", "\r\n<==[] Complete"); }
public void DeserializeDemogFormDesignFromPath() { string path = "C:\\SDC\\Demog CCO Lung Surgery.xml"; //string sdcFile = File.ReadAllText(path, System.Text.Encoding.UTF8); DemogFormDesignType FD = DemogFormDesignType.DeserializeFromXmlPath(path); var myXML = FD.GetXml(); Debug.Print(myXML); }
public void DeserializeDemogFormDesignFromPath() { BaseType.ClearTopNode(); //string path = @".\Test files\Demog CCO Lung Surgery.xml"; string path = Path.Combine(".", "Test files", "Demog CCO Lung Surgery.xml"); //if (!File.Exists(path)) path = @"/Test files/Demog CCO Lung Surgery.xml"; //string sdcFile = File.ReadAllText(path, System.Text.Encoding.UTF8); DemogFormDesignType FD = DemogFormDesignType.DeserializeFromXmlPath(path); var myXML = FD.GetXml(); Debug.Print(myXML); //Debug.Print(FD.GetJson()); var doc = new XmlDocument(); doc.LoadXml(myXML); var json = JsonConvert.SerializeXmlNode(doc); Debug.Print(json); doc = JsonConvert.DeserializeXmlNode(json); Debug.Print(doc.OuterXml); }