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 -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -