i tried to do this with DOM but didnt work.
Why do people make statements like that and expect help
What is the code you wrote? What happened when you ran it?
You do realize that having modified the DOM in memory you still need to write it to a file, right?
Bill