示例#1
0
        private async Task EnqueueHtmls()
        {
            var xmlData = await _fileReadService.ReadXmlFile().ConfigureAwait(false);

            var xsltData = await _fileReadService.ReadXsltFile().ConfigureAwait(false);

            foreach (var strData in xmlData)
            {
                var htmlData = TransformXMLToHTML(strData, xsltData);
                HtmlOutputs.Enqueue(htmlData);
            }
        }
示例#2
0
        public ActionResult ProcessXml()
        {
            ViewBag.Title = "XML Process Page";
            var xmlData  = _fileReadService.ReadXmlFile();
            var xsltData = _fileReadService.ReadXsltFile();
            int i        = 1;

            foreach (var strData in xmlData)
            {
                var htmlData = _fileTransformService.TransformXMLToHTML(strData, xsltData);
                _fileWriteService.WriteHtmlFile(htmlData, i++.ToString() + ".html");
            }
            return(View(i));
        }