Exemplo n.º 1
0
        /// <summary>
        /// Create the xml config file
        /// </summary>
        /// <param name="filename"></param>
        private static void _CreateXmlConfigFile(string filename)
        {
            XmlDocumentTemplate doc = new XmlDocumentTemplate();

            doc.AddDocumentInfo();
            doc.AddRootNode("configuration");
            doc.AddNode("data");
            doc.AddElement("connectionString", _cn);

            XmlProvider.CreateDocumentFromList(filename, doc);
        }
Exemplo n.º 2
0
        // -------------------------------------------------------
        // PRIVATE MEMBERS
        // -------------------------------------------------------

        /// <summary>
        /// Create the xml config file
        /// </summary>
        /// <param name="filename"></param>
        private void _CreateXmlConfigFile(string filename)
        {
            //List<XmlNodeTemplate> tree = new List<XmlNodeTemplate>();
            //tree.Add(new XmlNodeTemplate(TemplateNodeType.DocumentInfo, "", ""));
            //tree.Add(new XmlNodeTemplate(TemplateNodeType.RootNode, "configuration", ""));
            //tree.Add(new XmlNodeTemplate(TemplateNodeType.Node, "data", ""));
            //tree.Add(new XmlNodeTemplate(TemplateNodeType.Element, "connectionString", this._cn));

            XmlDocumentTemplate doc = new XmlDocumentTemplate();

            doc.AddDocumentInfo();
            doc.AddRootNode("configuration");
            doc.AddNode("data");
            doc.AddElement("connectionString", this._cn);

            XmlProvider.CreateDocumentFromList(filename, doc);
            //XmlProvider xml = new XmlProvider();
            //xml.CreateDocumentFromList(filename, doc);
        }