XmlDataTests GetDescendantWithAttributeAndName Method Delta Engine Documentation

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

public void GetDescendantWithAttributeAndName()
Examples

[Test]
public void GetDescendantWithAttributeAndName()
{
    XmlData root = CreateDeepTestXmlData();
    Assert.AreEqual(root.Children[0],
        root.GetDescendant(new XmlAttribute("Attr1", "Value1"), root.Children[0].Name));
    Assert.AreEqual(null,
        root.GetDescendant(new XmlAttribute("Attr1", "Value1"), root.Children[1].Name));
}
See Also