Esempio n. 1
0
        static void Main(string[] args)
        {
            var sourceFileName = "InputFile.xml";
            var targetFileName = "OutputFile.json";

            var documentSerializer = new CamelCaseJsonSerializer();
            var inputParser = new XMLInputParser();

            var formatConverter = new FormatConverter(inputParser, documentSerializer);
            if (formatConverter.Convert(sourceFileName, targetFileName) == false)
            {
                Console.WriteLine("Conversion failed.");
                Console.ReadLine();
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var sourceFileName = "InputFile.xml";
            var targetFileName = "OutputFile.json";

            var documentSerializer = new CamelCaseJsonSerializer();
            var inputParser        = new XMLInputParser();

            var formatConverter = new FormatConverter(inputParser, documentSerializer);

            if (formatConverter.Convert(sourceFileName, targetFileName) == false)
            {
                Console.WriteLine("Conversion failed.");
                Console.ReadLine();
            }
        }