At the following code i use foreach loop to check each node in nodelist and remove some of them.
after i remove one node the foreach loop throw the following error:
\"The el
For each is used for enumerating and you cannot delete while enumerating the list. Also the loop must start from the last element to avoid any shift when you delete an element.