Exemple #1
0
        public void Update()
        {
            try
            {
                dynamic xml = new XmlItem(xmlFile);
                Assert.IsNotNull(xml, "Xml is not loaded");

                string updated = DateTime.Now.ToString();
                xml["updated"] = updated;
                Assert.AreEqual(updated, xml["updated"]);

                string newName = "Mipoberg";
                xml.Personal.Name.Value = newName;
                Assert.AreEqual(newName, xml.Personal.Name.ToString());

                xml.Save(updatedXmlFile);
            }
            catch (Exception exc)
            {
                Assert.Fail(exc.Message);
            }
        }