XmlData GetTotalNodeCount Method Delta Engine Documentation

Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public int GetTotalNodeCount()

Return Value

Type: Int32
Remarks

Tests: DeltaEngine.Content.Xml.Tests.XmlDataTests
Examples

2 unit tests call DeltaEngine.Content.Xml.XmlData.GetTotalNodeCount
[Test]
public void GetTotalNodeCount()
{
    Assert.AreEqual(3, CreateShallowTestXmlData().GetTotalNodeCount());
    Assert.AreEqual(4, CreateDeepTestXmlData().GetTotalNodeCount());
}
[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());
}
See Also