public override void ExecuteProfile(Parser parser)
        {
            string relativePath = GetRelativePath(parser.Filename);

            string xmlfile = Path.Combine(Program.Configuration.Output, OutPutPath, relativePath, Path.GetFileNameWithoutExtension(parser.Filename)) + ".xml";

            var builder = new XmlMessageBuilder(parser);

            XmlWriter writer = XmlWriter.Create(xmlfile, new XmlWriterSettings
            {
                OmitXmlDeclaration = true,
                Indent             = true,
                IndentChars        = "\t",
                NamespaceHandling  = NamespaceHandling.OmitDuplicates,
            });

            builder.WriteToXml(writer);
            writer.Close();

            Console.WriteLine("Wrote {0}", xmlfile);
        }
Пример #2
0
        public override void ExecuteProfile(Parser parser)
        {
            string relativePath = this.GetRelativePath(parser.Filename);

            string xmlName = Path.GetFileNameWithoutExtension(parser.Filename) + ".xml";
            string xmlfile = Path.Combine(BuilderConfiguration.Instance.Output, this.OutPutPath, relativePath, xmlName);

            var builder = new XmlMessageBuilder(parser);

            XmlWriter writer = XmlWriter.Create(xmlfile,
                                                new XmlWriterSettings {
                OmitXmlDeclaration = true,
                Indent             = true,
                IndentChars        = "\t",
                NamespaceHandling  = NamespaceHandling.OmitDuplicates,
            });

            builder.WriteToXml(writer);
            writer.Close();

            Logger.Write(string.Format("Wrote {0}", xmlName), ConsoleColor.Gray);
        }