Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="XmlFileModifier"/> class.
        /// </summary>
        public XmlFileModifier(XmlTargetFile file, string targetFile, IRenderConfigLogger log, RenderConfigConfig config)
        {
            this.file       = file;
            this.log        = log;
            this.config     = config;
            this.targetFile = targetFile;

            //Get the document and set up the XmlReaderSettings
            document = new XmlDocument();
            settings = GetXmlReaderSettings(config.CleanOutput, document);

            using (XmlReader xml = XmlReader.Create(targetFile, settings))
            {
                document.Load(xml);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="XmlFileModifier"/> class.
        /// </summary>
        public XmlFileModifier(XmlTargetFile file, string targetFile, IRenderConfigLogger log, RenderConfigConfig config)
        {
            this.file = file;
            this.log = log;
            this.config = config;
            this.targetFile = targetFile;

            //Get the document and set up the XmlReaderSettings
            document = new XmlDocument();
            settings = GetXmlReaderSettings(config.CleanOutput, document);

            using (XmlReader xml = XmlReader.Create(targetFile, settings))
            {
                document.Load(xml);
            }

        }