I have IEnumerable<XElement> theTestCaseNodes
which has the following kind of XElements
<testcase>
<Main>
<test_step type ="action">
<Name>Goto</Name>
<description>xxxxxxxxx</description>
</test_step>
<test_step type ="check">
<Name>Click</Name>
<description>xxxxxxxxx</description>
</test_step>
</Main>
</testcase>
<testcase>
<Main>
<test_step type ="action">
<Name>Goto</Name>
<description>xxxxxxxxx</description>
</test_step>
<test_step type ="check">
<Name>Type</Name>
<description>xxxxxxxxx</description>
</test_step>
</Main>
</testcase>
Basically this is my testcase and I want to execute them in an order. So, now I want to read each node in IEnumerable using XMLReader.
Please help how to proceed!!
I understood that i need to use "using" but not sure how to proceed.
public void ExecuteTestcase(IEnumerable<XElement> theTestCaseNodes)
{
using (XmlReader aNodeReader = XmlReader.ReadSubtree()) {
}
}