c# - Loop through different elements? -
i have xml such:
<step> <check>...</check> <check>...</check> <action>...</action> </step> i want loop through sub nodes of <step>. know line:
foreach (xelement substep in document.descendants("check")) loops through elements only, how can loop through <check> elements , <action> elements?
for elements descendant step:
foreach (var element in document.element("step").elements()) { }
Comments
Post a Comment