예제 #1
0
        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");
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }