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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -