I want to remove empty nodes form a generated xml, before doing that i want to now the depth so that i can pass the depth as a parameter and run the loop that many times to remove the empty nodes.