jagjeetthukral & James R GreenHonestly both the codes are working pretty good. What I need is being achieved by both of them.But the code Jagjeet has posted, is a one time code and for the code snippet James has posted, I would need to hard code the element name every time I am making it a required...