Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Content.Xml.Tests.XmlDataTests
3 unit tests call DeltaEngine.Content.Xml.XmlData.Remove
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Remarks
Examples
[Test] public void Remove() { XmlData root = CreateDeepTestXmlData(); root.Children[0].Remove(); Assert.AreEqual(3, root.GetTotalNodeCount()); root.Children[0].Remove(); Assert.AreEqual(1, root.GetTotalNodeCount()); }
[Test] public void RemoveChild() { XmlData root = CreateDeepTestXmlData(); Assert.IsTrue(root.RemoveChild(root.Children[0])); Assert.IsFalse(root.RemoveChild(new XmlData("unknown"))); }
[Test] public void RemoveAttribute() { var root = new XmlData("root"); root.AddAttribute("attribute1", "value1"); root.AddAttribute("attribute2", "value2"); root.AddAttribute("attribute1", "value3"); root.RemoveAttribute("attribute1"); Assert.AreEqual(1, root.Attributes.Count); root.RemoveAttribute("attribute3"); Assert.AreEqual(1, root.Attributes.Count); }
See Also