private void SaveXML(string path)
        {
            // Convert UIpp to XML
            var            xml        = new XmlDocument();
            XmlDeclaration dec        = xml.CreateXmlDeclaration("1.0", "UTF-8", null);
            XmlNode        rootNode   = uipp.GenerateXML();
            XmlNode        importNode = xml.ImportNode(rootNode, true);

            xml.AppendChild(importNode);       // add UIpp
            xml.InsertBefore(dec, importNode); // add the declaration
            xml.Save(path);
        }
Exemple #2
0
        private void SaveXML(string path)
        {
            // Convert UIpp to XML
            var            xml        = new XmlDocument();
            XmlDeclaration dec        = xml.CreateXmlDeclaration("1.0", "UTF-8", null);
            XmlNode        rootNode   = uipp.GenerateXML();
            XmlNode        importNode = xml.ImportNode(rootNode, true);

            xml.AppendChild(importNode);       // add UIpp
            xml.InsertBefore(dec, importNode); // add the declaration
            using (XmlTextWriter xmlWriter = new XmlTextWriter(path, System.Text.Encoding.UTF8))
            {
                xmlWriter.QuoteChar  = '\'';
                xmlWriter.Formatting = Formatting.Indented;
                xml.Save(xmlWriter);
            }
            // xml.Save(path);
        }