You are creating a new element in no-namespace, but all the elements in your original XML belong to the http://www.ncpdp.org/schema/SCRIPT
namespace. In order to add the element correctly, the parser adds the xmlns=""
attribute so the element is declared to belong to no-namespace.
To fix that, create the element using org.w3c.dom.Document.createElementNS providing the namespace of your original file:
Element el = doc.createElementNS("http://www.ncpdp.org/schema/SCRIPT", "StatusCode");