If you're going to deal with documents with namespaces, you should at least set the DocumentBuilderFactory to be namespace-aware. By default it isn't.
It also appears that you don't know much about namespaces yourself, since the correct description of your problem is that the Header element and all its children have been changed from the default namespace with namespace URI "http://www.pqr.com/abc/lmn/qwe" to being in no namespace. Find a tutorial and read up on namespaces.
subject: xmlns ="" is added after changing the value of an element